Bump version to 0.12.0.

This commit is contained in:
Stephen Chung
2020-04-09 18:45:49 +08:00
parent 34ef2d6e00
commit 3609150dcf
8 changed files with 67 additions and 63 deletions

View File

@@ -62,9 +62,6 @@ fn test_call_fn() -> Result<(), EvalAltResult> {
#[test]
fn test_anonymous_fn() -> Result<(), EvalAltResult> {
let calc_func: Box<dyn Fn(INT, INT, INT) -> Result<INT, EvalAltResult>> =
Engine::new().create_from_script("fn calc() { 42 }", "calc")?;
let calc_func = Func::<(INT, INT, INT), INT>::create_from_script(
Engine::new(),
"fn calc(x, y, z) { (x + y) * z }",

View File

@@ -9,10 +9,10 @@ fn test_stack_overflow() -> Result<(), EvalAltResult> {
engine.eval::<i64>(
r"
fn foo(n) { if n == 0 { 0 } else { n + foo(n-1) } }
foo(38)
foo(30)
",
)?,
741
465
);
match engine.eval::<()>(