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

@@ -1445,7 +1445,7 @@ impl Engine {
// If new functions are defined within the eval string, it is an error
#[cfg(not(feature = "no_function"))]
if !ast.shared_lib().is_empty() {
if ast.has_functions() {
return Err(crate::PERR::WrongFnDefinition.into());
}