aboutsummaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
authorTill Hoeppner2015-06-27 21:38:40 +0200
committerTill Hoeppner2015-06-27 21:38:40 +0200
commit1e1dd0b217b627ce24ce280c5cf5e9dd27a38ba2 (patch)
tree48bedca538fe492574268f904a00699827acbee5 /src/client.rs
parent3e02df5fabf1ea31aee61d4ec3e19ad85b312405 (diff)
downloadirsc-1e1dd0b217b627ce24ce280c5cf5e9dd27a38ba2.tar.gz
irsc-1e1dd0b217b627ce24ce280c5cf5e9dd27a38ba2.tar.xz
irsc-1e1dd0b217b627ce24ce280c5cf5e9dd27a38ba2.zip
Add to_static functionality for Commands
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.rs b/src/client.rs
index 2ea2e13..84841d4 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -220,9 +220,9 @@ impl SharedClient {
pub fn events(&self) -> Stream<(SharedClient, Message, Arc<Event<'static>>)> {
self.messages().filter_map(|(cl, msg)| match Command::from_message(&msg) {
- Some(m) => Some((cl, msg, Arc::new(Event::Command(m.clone())))),
+ Some(m) => Some((cl, msg.clone(), Arc::new(Event::Command(m.clone()).to_static()))),
None => match Reply::from_message(&msg) {
- Some(r) => Some((cl, msg, Arc::new(Event::Reply(r)))),
+ Some(r) => Some((cl, msg.clone(), Arc::new(Event::Reply(r).to_static()))),
None => None
}
})