Use Engine::new().
This commit is contained in:
parent
ec19103478
commit
bc8aa470cb
@ -1,8 +1,7 @@
|
||||
use rhai::{packages::*, Engine, EvalAltResult, INT};
|
||||
use rhai::{Engine, EvalAltResult, INT};
|
||||
|
||||
fn main() -> Result<(), Box<EvalAltResult>> {
|
||||
let mut engine = Engine::new_raw();
|
||||
engine.load_package(ArithmeticPackage::new().get());
|
||||
let engine = Engine::new();
|
||||
|
||||
let result = engine.eval::<INT>("40 + 2")?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user