diff --git a/src/client/reactor.rs b/src/client/reactor.rs index 110f3bf..34bf937 100644 --- a/src/client/reactor.rs +++ b/src/client/reactor.rs @@ -138,8 +138,8 @@ impl IrcReactor { /// # } /// ``` pub fn register_client_with_handler( - &mut self, client: IrcClient, handler: F - ) where F: Fn(&IrcClient, Message) -> U + 'static, + &mut self, client: IrcClient, mut handler: F + ) where F: FnMut(&IrcClient, Message) -> U + 'static, U: IntoFuture + 'static { self.handlers.push(Box::new(client.stream().for_each(move |message| { handler(&client, message)