Refactor to do more pre-calculation work.
This commit is contained in:
@@ -287,7 +287,8 @@ fn collect_fn_metadata(
|
||||
|
||||
#[cfg(not(feature = "no_module"))]
|
||||
{
|
||||
use crate::{tokenizer::Token::DoubleColon, Shared, SmartString};
|
||||
use crate::engine::NAMESPACE_SEPARATOR;
|
||||
use crate::{Shared, SmartString};
|
||||
|
||||
// Recursively scan modules for script-defined functions.
|
||||
fn scan_module(
|
||||
@@ -305,7 +306,7 @@ fn collect_fn_metadata(
|
||||
use std::fmt::Write;
|
||||
|
||||
let mut ns = SmartString::new_const();
|
||||
write!(&mut ns, "{namespace}{}{name}", DoubleColon.literal_syntax()).unwrap();
|
||||
write!(&mut ns, "{namespace}{}{name}", NAMESPACE_SEPARATOR).unwrap();
|
||||
scan_module(engine, list, &ns, m, filter);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user