wiggle-wasmtime: use fully qualified std::rc::Rc<std::cell::RefCell<>> in expansion

This commit is contained in:
Pat Hickey
2021-03-26 17:21:51 -07:00
parent 550c774c1d
commit 8da3de6756

View File

@@ -288,7 +288,7 @@ fn generate_func(
let #name_ident = wasmtime::Func::#wrapper( let #name_ident = wasmtime::Func::#wrapper(
store, store,
ctx.clone(), ctx.clone(),
move |caller: wasmtime::Caller<'_>, my_ctx: &Rc<RefCell<_>> #(,#arg_decls)*| move |caller: wasmtime::Caller<'_>, my_ctx: &std::rc::Rc<std::cell::RefCell<_>> #(,#arg_decls)*|
-> Box<dyn std::future::Future<Output = Result<#ret_ty, wasmtime::Trap>>> { -> Box<dyn std::future::Future<Output = Result<#ret_ty, wasmtime::Trap>>> {
Box::new(async move { Self::#fn_ident(&caller, &mut my_ctx.borrow_mut() #(, #arg_names)*).await }) Box::new(async move { Self::#fn_ident(&caller, &mut my_ctx.borrow_mut() #(, #arg_names)*).await })
} }