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:
@@ -15,7 +15,7 @@ fn main() -> Result<()> {
|
||||
let instance = Instance::new(&mut store, &module, &[])?;
|
||||
|
||||
// Invoke `fibonacci` export with higher and higher numbers until we exhaust our fuel.
|
||||
let fibonacci = instance.get_typed_func::<i32, i32, _>(&mut store, "fibonacci")?;
|
||||
let fibonacci = instance.get_typed_func::<i32, i32>(&mut store, "fibonacci")?;
|
||||
for n in 1.. {
|
||||
let fuel_before = store.fuel_consumed().unwrap();
|
||||
let output = match fibonacci.call(&mut store, n) {
|
||||
|
||||
Reference in New Issue
Block a user