Skip to content

Commit 6252c7a

Browse files
committed
Fix warnings about missing dyn on trait objects
1 parent c21c85a commit 6252c7a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/headless/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ pub mod strings;
5454

5555
#[wasm_bindgen_test]
5656
fn closures_work() {
57-
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
57+
let x = Closure::wrap(Box::new(|| {}) as Box<dyn FnMut()>);
5858
drop(x);
59-
let x = Closure::wrap(Box::new(|| {}) as Box<FnMut()>);
59+
let x = Closure::wrap(Box::new(|| {}) as Box<dyn FnMut()>);
6060
x.forget();
6161
}

tests/headless/strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use wasm_bindgen_test::*;
33

44
#[wasm_bindgen(module = "/tests/headless/strings.js")]
55
extern "C" {
6-
fn test_string_roundtrip(c: &Closure<Fn(String) -> String>);
6+
fn test_string_roundtrip(c: &Closure<dyn Fn(String) -> String>);
77
}
88

99
#[wasm_bindgen_test]

0 commit comments

Comments
 (0)