diff options
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)); |