Make Engine reentrant to prepare for parallel execution.

This commit is contained in:
Stephen Chung
2020-04-07 13:23:06 +08:00
parent e204ae1a2c
commit e795a50ae2
44 changed files with 415 additions and 404 deletions

View File

@@ -4,7 +4,7 @@ use rhai::{Engine, EvalAltResult, INT};
// TODO also add test case for unary after compound
// Hah, turns out unary + has a good use after all!
fn test_unary_after_binary() -> Result<(), EvalAltResult> {
let mut engine = Engine::new();
let engine = Engine::new();
assert_eq!(engine.eval::<INT>("10 % +4")?, 2);
assert_eq!(engine.eval::<INT>("10 << +4")?, 160);