Minor refactor.

This commit is contained in:
Stephen Chung
2021-12-02 12:49:46 +08:00
parent 4b4b7a753b
commit d36e2d22d1
4 changed files with 8 additions and 9 deletions

View File

@@ -143,7 +143,7 @@ fn test_fn_ptr_make_closure() -> Result<(), Box<EvalAltResult>> {
let fn_ptr = engine.eval_ast::<FnPtr>(&ast)?;
move |x: INT| -> Result<String, Box<EvalAltResult>> { fn_ptr.call(&engine, &ast, (x,)) }
move |x: INT| -> Result<String, _> { fn_ptr.call(&engine, &ast, (x,)) }
};
// 'f' captures: the Engine, the AST, and the closure