Satisfy clippy.

This commit is contained in:
Stephen Chung
2022-11-25 09:46:13 +08:00
parent 2bf8e610a3
commit 6600862c22
13 changed files with 107 additions and 123 deletions

View File

@@ -304,12 +304,12 @@ fn collect_fn_metadata(
let mut ns = SmartString::new_const();
write!(&mut ns, "{namespace}{}{name}", DoubleColon.literal_syntax()).unwrap();
scan_module(engine, list, &ns, &**m, filter);
scan_module(engine, list, &ns, m, filter);
}
}
for (ns, m) in ctx.iter_imports_raw() {
scan_module(engine, &mut list, ns, &**m, filter);
scan_module(engine, &mut list, ns, m, filter);
}
}

View File

@@ -574,7 +574,7 @@ mod decimal_functions {
.into(),
)
},
|n| Ok(n),
Ok,
)
}
/// Return the integral part of the decimal number.

View File

@@ -541,7 +541,7 @@ mod string_functions {
/// ```
#[rhai_fn(name = "contains")]
pub fn contains_char(string: &str, character: char) -> bool {
string.contains(character).into()
string.contains(character)
}
/// Return `true` if the string starts with a specified string.