diff options
author | Eduardo Broto <ebroto@tutanota.com> | 2019-12-07 21:24:57 +0100 |
---|---|---|
committer | Eduardo Broto <ebroto@tutanota.com> | 2019-12-07 22:38:01 +0100 |
commit | 9e6f390c1f34de0d0b413f4704fc2d1f655c47bc (patch) | |
tree | 089b711721a9c4aac2e461a2fa7211d7ba5de266 /src/tests | |
parent | 423c6a52ba84c27b8667a762ee33bc28f44f0e37 (diff) |
chore(style): fix clippy errors
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/cases/raw_mode.rs | 2 | ||||
-rw-r--r-- | src/tests/fakes/fake_input.rs | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/tests/cases/raw_mode.rs b/src/tests/cases/raw_mode.rs index 26a1801..f0989ca 100644 --- a/src/tests/cases/raw_mode.rs +++ b/src/tests/cases/raw_mode.rs @@ -37,7 +37,7 @@ fn build_tcp_packet( pkt.packet().to_vec() } -fn format_raw_output<'t>(output: Vec<u8>) -> String { +fn format_raw_output(output: Vec<u8>) -> String { let stdout_utf8 = String::from_utf8(output).unwrap(); use regex::Regex; let timestamp = Regex::new(r"<\d+>").unwrap(); diff --git a/src/tests/fakes/fake_input.rs b/src/tests/fakes/fake_input.rs index 889e708..b3b089b 100644 --- a/src/tests/fakes/fake_input.rs +++ b/src/tests/fakes/fake_input.rs @@ -10,9 +10,12 @@ use ::std::task::{Context, Poll}; use ::std::{thread, time}; use ::termion::event::Event; -use crate::network::{ - dns::{self, Lookup}, - Connection, Protocol, +use crate::{ + network::{ + dns::{self, Lookup}, + Connection, Protocol, + }, + os::OnSigWinch, }; pub struct KeyboardEvents { @@ -142,7 +145,7 @@ pub fn get_interface() -> NetworkInterface { } } -pub fn create_fake_on_winch(should_send_winch_event: bool) -> Box<dyn Fn(Box<dyn Fn()>) + Send> { +pub fn create_fake_on_winch(should_send_winch_event: bool) -> Box<OnSigWinch> { Box::new(move |cb| { if should_send_winch_event { thread::sleep(time::Duration::from_millis(900)); |