From 2b8578d3cb32ea4686f35e4db5f486f320d55afd Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 21 Sep 2022 19:06:18 +0800 Subject: [PATCH] Fix bug. --- src/eval/stmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eval/stmt.rs b/src/eval/stmt.rs index a176b670..60587b4f 100644 --- a/src/eval/stmt.rs +++ b/src/eval/stmt.rs @@ -865,7 +865,7 @@ impl Engine { #[cfg(not(feature = "no_module"))] if global.scope_level == 0 && access == AccessMode::ReadOnly - && lib.iter().copied().any(Module::is_empty) + && lib.iter().any(|m| !m.is_empty()) { crate::func::locked_write(global.constants.get_or_insert_with( || {