Remove explicit S type parameters (#5275)
* Remove explicit `S` type parameters This commit removes the explicit `S` type parameter on `Func::typed` and `Instance::get_typed_func`. Historical versions of Rust required that this be a type parameter but recent rustcs support a mixture of explicit type parameters and `impl Trait`. This removes, at callsites, a superfluous `, _` argument which otherwise never needs specification. * Fix mdbook examples
This commit is contained in:
@@ -44,7 +44,7 @@ fn main() -> Result<()> {
|
||||
|
||||
println!("Calling `externref` func...");
|
||||
let func =
|
||||
instance.get_typed_func::<Option<ExternRef>, Option<ExternRef>, _>(&mut store, "func")?;
|
||||
instance.get_typed_func::<Option<ExternRef>, Option<ExternRef>>(&mut store, "func")?;
|
||||
let ret = func.call(&mut store, Some(externref.clone()))?;
|
||||
assert!(ret.is_some());
|
||||
assert!(ret.unwrap().ptr_eq(&externref));
|
||||
|
||||
Reference in New Issue
Block a user