diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-09-08 13:05:25 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-09-08 13:05:25 -0400 |
commit | 6bf08295188b48c2c0a141546fc67f1457f40961 (patch) | |
tree | 0090f7af42c39380a552301153913ac2b3ed7ad9 /src | |
parent | e41c5fa768cd006fc35ae14d7f6dec7912462161 (diff) | |
download | rust-irc-6bf08295188b48c2c0a141546fc67f1457f40961.tar.gz rust-irc-6bf08295188b48c2c0a141546fc67f1457f40961.zip |
pass &Message around, since Message isn't copyable
Diffstat (limited to 'src')
-rw-r--r-- | src/client.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.rs b/src/client.rs index 979d33b..06548f3 100644 --- a/src/client.rs +++ b/src/client.rs @@ -86,10 +86,10 @@ pub trait Client { msg.write_protocol_string(self.conn()); } - fn run_loop_with (mut self, handler: |&mut Self, Message|) -> Self { + fn run_loop_with (mut self, handler: |&mut Self, &Message|) -> Self { loop { let m = self.read(); - handler(&mut self, m); + handler(&mut self, &m); } self } @@ -143,5 +143,5 @@ pub trait Client { fn on_disconnect (client: &mut Self) { } - fn on_message (client: &mut Self, m: Message) { } + fn on_message (client: &mut Self, m: &Message) { } } |