Fix builds.

This commit is contained in:
Stephen Chung
2022-04-21 16:01:20 +08:00
parent 6b8ddd925b
commit 6f4cc91451
2 changed files with 10 additions and 3 deletions

View File

@@ -112,6 +112,7 @@ fn test_options_strict_var() -> Result<(), Box<EvalAltResult>> {
engine.compile("let x = 42; let f = |y| { || x + y };")?;
assert!(engine.compile("fn foo() { |y| { || x + y } }").is_err());
}
#[cfg(not(feature = "no_optimize"))]
assert_eq!(
engine.eval_with_scope::<INT>(&mut scope, "fn foo(z) { x * y + z } foo(1)")?,
1