diff options
Diffstat (limited to 'src/tests/fakes/fake_input.rs')
-rw-r--r-- | src/tests/fakes/fake_input.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tests/fakes/fake_input.rs b/src/tests/fakes/fake_input.rs index 6d76471..1cd5fa4 100644 --- a/src/tests/fakes/fake_input.rs +++ b/src/tests/fakes/fake_input.rs @@ -144,16 +144,14 @@ pub fn get_interface() -> NetworkInterface { pub fn create_fake_lookup_addr( ips_to_hosts: HashMap<IpAddr, String>, -) -> Box<Fn(&IpAddr) -> Option<String> + Send + Sync + 'static> { +) -> Box<Fn(&IpAddr) -> Option<String> + Send> { Box::new(move |ip| match ips_to_hosts.get(ip) { Some(host) => Some(host.clone()), None => None, }) } -pub fn create_fake_on_winch( - should_send_winch_event: bool, -) -> Box<Fn(Box<Fn() + Send + Sync + 'static>) + Send + Sync + 'static> { +pub fn create_fake_on_winch(should_send_winch_event: bool) -> Box<Fn(Box<Fn()>) + Send> { Box::new(move |cb| { if should_send_winch_event { thread::sleep(time::Duration::from_secs(1)); |