mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-15 21:02:10 +03:00
Fix warnings about missing dyn
on trait objects
This commit is contained in:
parent
c21c85a7ff
commit
6252c7ab78
@ -54,8 +54,8 @@ pub mod strings;
|
|||||||
|
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
fn closures_work() {
|
fn closures_work() {
|
||||||
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
|
let x = Closure::wrap(Box::new(|| {}) as Box<dyn FnMut()>);
|
||||||
drop(x);
|
drop(x);
|
||||||
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
|
let x = Closure::wrap(Box::new(|| {}) as Box<dyn FnMut()>);
|
||||||
x.forget();
|
x.forget();
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ use wasm_bindgen_test::*;
|
|||||||
|
|
||||||
#[wasm_bindgen(module = "/tests/headless/strings.js")]
|
#[wasm_bindgen(module = "/tests/headless/strings.js")]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn test_string_roundtrip(c: &Closure<Fn(String) -> String>);
|
fn test_string_roundtrip(c: &Closure<dyn Fn(String) -> String>);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
|
Loading…
Reference in New Issue
Block a user