Change Engine::consume_XXX to Engine::run_XXX.

This commit is contained in:
Stephen Chung
2021-08-06 14:46:27 +08:00
parent e0125a1033
commit 180ad77224
23 changed files with 160 additions and 67 deletions

View File

@@ -3,7 +3,7 @@ use rhai::{Engine, EvalAltResult, INT};
fn main() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
engine.consume(r#"print("hello, world!")"#)?;
engine.run(r#"print("hello, world!")"#)?;
let result = engine.eval::<INT>("40 + 2")?;