diff --git a/src/uu/pmap/src/pmap.rs b/src/uu/pmap/src/pmap.rs index 2c5be5c8..ba46a35a 100644 --- a/src/uu/pmap/src/pmap.rs +++ b/src/uu/pmap/src/pmap.rs @@ -49,7 +49,7 @@ pub fn uu_app() -> Command { .help("Process ID") .required_unless_present_any(["create-rc", "create-rc-to"]) // Adjusted for -n, -N note .action(ArgAction::Set) - .conflicts_with_all(&["create-rc", "create-rc-to"]), + .conflicts_with_all(["create-rc", "create-rc-to"]), ) // Ensure pid is not used with -n, -N .arg( Arg::new("extended") @@ -129,14 +129,14 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { Ok(cmdline) => { println!("{}: {}", pid, cmdline); } - Err(e) => { + Err(_) => { process::exit(42); } } match parse_maps(pid) { Ok(_) => println!("Memory map displayed successfully."), - Err(e) => { + Err(_) => { process::exit(1); } } diff --git a/src/uu/w/src/w.rs b/src/uu/w/src/w.rs index 66a5f0cc..5fb9acbd 100644 --- a/src/uu/w/src/w.rs +++ b/src/uu/w/src/w.rs @@ -43,7 +43,8 @@ fn fetch_user_info() -> Result, std::io::Error> { } #[uucore::main] pub fn uumain(args: impl uucore::Args) -> UResult<()> { - let matches = uu_app().try_get_matches_from(args)?; + // TODO: rename var when it's used + let _matches = uu_app().try_get_matches_from(args)?; match fetch_user_info() { Ok(user_info) => { diff --git a/src/uu/watch/src/watch.rs b/src/uu/watch/src/watch.rs index 1c637adf..7d07594d 100644 --- a/src/uu/watch/src/watch.rs +++ b/src/uu/watch/src/watch.rs @@ -4,7 +4,7 @@ // file that was distributed with this source code. use clap::crate_version; -use clap::{Arg, ArgAction, Command}; +use clap::{Arg, Command}; use std::process::{Command as SystemCommand, Stdio}; use std::thread::sleep; use std::time::Duration;