From 7df8a940294efa8e0749e6a6d9e9bb5f34bed235 Mon Sep 17 00:00:00 2001 From: svartalf Date: Tue, 3 Mar 2020 12:52:58 +0300 Subject: [PATCH] Clippy IV: Last Blood --- examples/wait.rs | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/examples/wait.rs b/examples/wait.rs index 8a9b184e..ffea24ce 100644 --- a/examples/wait.rs +++ b/examples/wait.rs @@ -16,22 +16,19 @@ use heim::process; #[tokio::main] async fn main() -> Result<(), Box> { - #[cfg(target_os = "linux")] // Not implemented yet for other platforms - { - let pid = env::args() - .nth(1) - .ok_or_else(|| { - eprintln!("Process PID is not passed as a CLI argument"); - io::Error::from(io::ErrorKind::InvalidInput) - })? - .parse::()?; + let pid = env::args() + .nth(1) + .ok_or_else(|| { + eprintln!("Process PID is not passed as a CLI argument"); + io::Error::from(io::ErrorKind::InvalidInput) + })? + .parse::()?; - let process = process::get(pid).await?; + let process = process::get(pid).await?; - println!("Watching for process {} completion", pid); - process.wait().await?; - println!("Process {} had exited", pid); - } + println!("Watching for process {} completion", pid); + process.wait().await?; + println!("Process {} had exited", pid); Ok(()) }