Use ImmutableString in more places.

This commit is contained in:
Stephen Chung
2022-10-29 14:59:20 +08:00
parent 8e35f98477
commit 91415b9750
11 changed files with 45 additions and 85 deletions

View File

@@ -442,8 +442,8 @@ impl Module {
if f.access != FnAccess::Private {
#[cfg(not(feature = "no_custom_syntax"))]
let operator = def.engine.custom_keywords.contains_key(&f.name)
|| (!f.name.contains('$') && !is_valid_function_name(&f.name));
let operator = def.engine.custom_keywords.contains_key(f.name.as_str())
|| (!f.name.contains('$') && !is_valid_function_name(f.name.as_str()));
#[cfg(feature = "no_custom_syntax")]
let operator = !f.name.contains('$') && !is_valid_function_name(&f.name);