Use dyn with all trait objects

Fixes new warnings showing up on nightly nowadays.
This commit is contained in:
Alex Crichton
2019-06-03 08:26:14 -07:00
parent f3adee7056
commit 82467f9793
15 changed files with 144 additions and 144 deletions

View File

@ -114,7 +114,7 @@ impl WorkerPool {
pub fn new(max: u32) -> Result<WorkerPool, JsValue> {
let callback = Closure::wrap(Box::new(|event: Event| {
console_log!("unhandled event: {}", event.type_());
}) as Box<FnMut(Event)>);
}) as Box<dyn FnMut(Event)>);
let mut workers = Vec::new();
for _ in 0..max {
// TODO: what do do about `./worker.js`: