Skip to content

Commit

Permalink
Living on the edge
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKniephoff committed Jul 18, 2020
1 parent e8fc1ca commit f118cca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = { version = "0.2.33" }
wasm-bindgen = { version = "0.2.33", features = ["nightly"] }
console_error_panic_hook = "0.1.5"
rand = "0.7"

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ fn add_event_listener<E>(
event_type: &str,
handler: impl FnMut(E) + 'static,
) where E: FromWasmAbi + 'static {
let closure: Closure<dyn FnMut(E)> = Closure::wrap(Box::new(handler));
let closure: Closure<dyn FnMut(E)> = Closure::new(handler);
target.add_event_listener_with_callback(
event_type,
closure.as_ref().unchecked_ref()
Expand Down

0 comments on commit f118cca

Please sign in to comment.