From bc8aa470cb2eb2ffc360f9ff89e77123b9f33cdf Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 7 Oct 2020 15:52:24 +0800 Subject: [PATCH] Use Engine::new(). --- examples/hello.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/hello.rs b/examples/hello.rs index af5e8b9c..00913e2c 100644 --- a/examples/hello.rs +++ b/examples/hello.rs @@ -1,8 +1,7 @@ -use rhai::{packages::*, Engine, EvalAltResult, INT}; +use rhai::{Engine, EvalAltResult, INT}; fn main() -> Result<(), Box> { - let mut engine = Engine::new_raw(); - engine.load_package(ArithmeticPackage::new().get()); + let engine = Engine::new(); let result = engine.eval::("40 + 2")?;