diff --git a/src/runner.rs b/src/runner.rs index 02b1f13..64d3b08 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -49,7 +49,12 @@ macro_rules! logger_thread { if buf.is_empty() { continue; } - match $sender.clone().lock().expect("Could not lock sender").send(buf) { + match $sender + .clone() + .lock() + .expect("Could not lock sender") + .send(buf) + { Ok(_) => {} Err(_) => return, }; @@ -57,11 +62,15 @@ macro_rules! logger_thread { }; } }) - } + }; } impl Runner { - pub fn new(environment: Option>, command: String, args: Vec) -> Self { + pub fn new( + environment: Option>, + command: String, + args: Vec, + ) -> Self { let (sender, receiver) = sync_channel(64000); Self { environment: match environment { @@ -179,10 +188,7 @@ mod tests { runner.terminate(); assert_eq!(runner.status(), RunnerStatus::Stopped); let out = runner.get_output(); - assert_eq!( - out, - "REX2TEST: Lorem ipsum dolor\n" - ); + assert_eq!(out, "REX2TEST: Lorem ipsum dolor\n"); } #[test] @@ -197,7 +203,9 @@ mod tests { sleep(time::Duration::from_millis(10)); } - runner.save_output("./target/testout/testlog".into()); + runner + .save_output("./target/testout/testlog".into()) + .expect("Failed to save output file"); } #[test] diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 7c574f5..b76f701 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -1,4 +1,3 @@ - pub mod main_win; pub mod widgets; pub mod styles;