From c49c24d50b22724e687bf1827b4e4ae15c942e98 Mon Sep 17 00:00:00 2001 From: omdxp Date: Sun, 7 Jan 2024 20:36:46 +0100 Subject: [PATCH] hotfix: export get_node_by_path function from api module --- rust/build.rs | 7 ++++--- rust/src/lib.rs | 7 +++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/rust/build.rs b/rust/build.rs index 7b62b0a..f501ede 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -115,8 +115,7 @@ use crate::node::model::{{Node, NodeName, NodeType, NodeTerms}}; {} pub fn get_node_by_path(path: &str) -> Option<&Node> {{ match path {{ -{} - _ => None, +{} _ => None, }} }}"##, string_tree.0, string_tree.1 @@ -125,7 +124,9 @@ pub fn get_node_by_path(path: &str) -> Option<&Node> {{ fs::write("./src/_auto_generated/data.rs", data)?; fs::write( "./src/_auto_generated/mod.rs", - "// This is auto-generated. Do not edit manually\npub mod data;\n", + r#"// This is auto-generated. Do not edit manually +pub mod data; +"#, )?; Ok(()) } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 36fe444..f4aea4d 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -1,3 +1,6 @@ mod _auto_generated; -pub mod api; -pub mod node; +mod api; +mod node; + +pub use api::get_node_by_path::get_node_by_path; +pub use node::model::{Node, NodeName, NodeTerms, NodeType};