Reduce call to Module::is_empty.

This commit is contained in:
Stephen Chung
2022-11-10 23:57:46 +08:00
parent 013ee223ee
commit fca71b5ed2
8 changed files with 15 additions and 43 deletions

View File

@@ -118,9 +118,7 @@ impl Engine {
.cloned()
.for_each(|(n, m)| global.push_import(n, m));
if !lib.is_empty() {
global.lib.push(lib.clone());
}
global.lib.push(lib.clone());
Some(mem::replace(&mut global.constants, constants.clone()))
} else {