From e514c97688d3f8f3573ea83b639509b5d3a2663e Mon Sep 17 00:00:00 2001 From: panicbit Date: Mon, 26 Mar 2018 08:53:38 +0200 Subject: [PATCH] Use FnMut for registering client handlers --- src/client/reactor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)