Use turbofish for impl Trait.

This commit is contained in:
Stephen Chung
2022-08-12 22:48:15 +08:00
parent 195c81c6ff
commit 1c7b80ed13
7 changed files with 31 additions and 31 deletions

View File

@@ -338,7 +338,7 @@ fn test_closures_shared_obj() -> Result<(), Box<EvalAltResult>> {
let res = engine.eval_ast::<Map>(&ast)?;
// Make closure
let f = move |p1: TestStruct, p2: TestStruct| -> Result<(), Box<EvalAltResult>> {
let f = move |p1: TestStruct, p2: TestStruct| {
let action_ptr = res["action"].clone_cast::<FnPtr>();
let name = action_ptr.fn_name();
engine.call_fn(&mut Scope::new(), &ast, name, (p1, p2))