Skip to content

Commit

Permalink
Merge pull request #14 from cakebaker/clippy_fix_warnings
Browse files Browse the repository at this point in the history
clippy: fix warnings
  • Loading branch information
sylvestre authored Feb 10, 2024
2 parents 0b6d165 + 053a2bc commit d5f7201
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/uu/pmap/src/pmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/uu/w/src/w.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ fn fetch_user_info() -> Result<Vec<UserInfo>, 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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/uu/watch/src/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5f7201

Please sign in to comment.