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>> {
|
fn main() -> Result<(), Box<EvalAltResult>> {
|
||||||
let mut engine = Engine::new_raw();
|
let engine = Engine::new();
|
||||||
engine.load_package(ArithmeticPackage::new().get());
|
|
||||||
|
|
||||||
let result = engine.eval::<INT>("40 + 2")?;
|
let result = engine.eval::<INT>("40 + 2")?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user