diff options
author | Wesley Moore <wes@wezm.net> | 2019-10-20 09:27:04 +1100 |
---|---|---|
committer | Wesley Moore <wes@wezm.net> | 2019-10-20 09:27:04 +1100 |
commit | a47f1efa5be198642642103dca5dfcaa926da4bb (patch) | |
tree | ca759aa656b33822bb2fbb3d8b078e1e4cce3d37 /src/tests/fakes | |
parent | 0229b2e8ec46a1e37bb8d332d9c2f6a6f96645e4 (diff) |
Address compiler warnings
Diffstat (limited to 'src/tests/fakes')
-rw-r--r-- | src/tests/fakes/fake_input.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/fakes/fake_input.rs b/src/tests/fakes/fake_input.rs index 831d4fb..04c5231 100644 --- a/src/tests/fakes/fake_input.rs +++ b/src/tests/fakes/fake_input.rs @@ -137,14 +137,14 @@ pub fn get_interface() -> NetworkInterface { pub fn create_fake_lookup_addr( ips_to_hosts: HashMap<IpAddr, String>, -) -> Box<Fn(&IpAddr) -> Option<String> + Send> { +) -> Box<dyn 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> { +pub fn create_fake_on_winch(should_send_winch_event: bool) -> Box<dyn Fn(Box<dyn Fn()>) + Send> { Box::new(move |cb| { if should_send_winch_event { thread::sleep(time::Duration::from_secs(1)); |