diff --git a/router.rs b/router.rs index 2dd3b7eec..63a23e7f8 100644 --- a/router.rs +++ b/router.rs @@ -113,7 +113,7 @@ impl Router { } } IpcSelectionResult::MessageReceived(id, message) => { - self.handlers.get(&id).unwrap()(message) + self.handlers.get_mut(&id).unwrap()(message) } IpcSelectionResult::ChannelClosed(id) => { self.handlers.remove(&id).unwrap(); @@ -128,5 +128,5 @@ enum RouterMsg { AddRoute(OpaqueIpcReceiver, RouterHandler), } -pub type RouterHandler = Box; +pub type RouterHandler = Box;