Optimize imports layout.

This commit is contained in:
Stephen Chung
2021-03-12 22:30:08 +08:00
parent 81ca86a8d2
commit 61b0c7b2b3
4 changed files with 36 additions and 42 deletions

View File

@@ -539,7 +539,10 @@ impl Engine {
#[cfg(not(feature = "no_module"))]
if !fn_def.mods.is_empty() {
mods.extend(fn_def.mods.iter_raw().map(|(n, m)| (n.clone(), m.clone())));
fn_def
.mods
.iter_raw()
.for_each(|(n, m)| mods.push(n.clone(), m.clone()));
}
// Evaluate the function