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:
@@ -133,8 +133,8 @@ fn cross_store() -> anyhow::Result<()> {
|
||||
.call(&mut store2, &[Some(s2_f.clone()).into()], &mut [])
|
||||
.is_ok());
|
||||
|
||||
let s1_f_t = s1_f.typed::<Option<Func>, (), _>(&store1)?;
|
||||
let s2_f_t = s2_f.typed::<Option<Func>, (), _>(&store2)?;
|
||||
let s1_f_t = s1_f.typed::<Option<Func>, ()>(&store1)?;
|
||||
let s2_f_t = s2_f.typed::<Option<Func>, ()>(&store2)?;
|
||||
|
||||
assert!(s1_f_t.call(&mut store1, None).is_ok());
|
||||
assert!(s2_f_t.call(&mut store2, None).is_ok());
|
||||
|
||||
Reference in New Issue
Block a user