summaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rwxr-xr-xsrc/client.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.rs b/src/client.rs
index a1a63f7..82781e8 100755
--- a/src/client.rs
+++ b/src/client.rs
@@ -12,11 +12,11 @@ use super::events::stream_mapper::*;
use super::commands::stream_mapper::CommandToByteMapper;
use super::commands::Command;
-type EventClosure = dyn FnMut(Event) + Sync + Send + 'static;
+type EventClosure = dyn FnMut(&Event) + Sync + Send + 'static;
type EventClosureMutex = Box<EventClosure>;
pub fn event_handler<F>(f: F) -> EventClosureMutex
- where F: FnMut(Event) + Sync + Send + 'static
+ where F: FnMut(&Event) + Sync + Send + 'static
{
Box::new(f)
}
@@ -72,7 +72,7 @@ impl FlicClient {
EventResult::Some(event) => {
let mut map = self.map.lock().await;
for ref mut f in &mut *map {
- f(event.clone());
+ f(&event);
}
}
_ => {}