From 1e1dd0b217b627ce24ce280c5cf5e9dd27a38ba2 Mon Sep 17 00:00:00 2001 From: Till Hoeppner Date: Sat, 27 Jun 2015 21:38:40 +0200 Subject: Add to_static functionality for Commands --- src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client.rs') 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>)> { 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 } }) -- cgit v1.2.3