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:
@@ -55,7 +55,7 @@ fn duration_of_call(engine: &Engine, module: &Module) -> Duration {
|
||||
let mut store = Store::new(engine, ());
|
||||
let inst = Instance::new(&mut store, module, &[]).expect("instantiate");
|
||||
let f = inst.get_func(&mut store, "f").expect("get f");
|
||||
let f = f.typed::<(), (), _>(&store).expect("type f");
|
||||
let f = f.typed::<(), ()>(&store).expect("type f");
|
||||
|
||||
let call = Instant::now();
|
||||
f.call(&mut store, ()).expect("call f");
|
||||
|
||||
Reference in New Issue
Block a user