diff options
| author | Marijn Schouten <mhkbst@gmail.com> | 2025-07-11 05:03:22 +0000 |
|---|---|---|
| committer | Marijn Schouten <mhkbst@gmail.com> | 2025-07-11 05:38:00 +0000 |
| commit | 28612748f61767c20c93da45156fc4ebde604dc1 (patch) | |
| tree | 500b9b298ee418e4e53a8fac9ee5292955e31cf6 | |
| parent | 119574f83576dc1f3ae067f9a97986d4e2b0826c (diff) | |
| download | rust-28612748f61767c20c93da45156fc4ebde604dc1.tar.gz rust-28612748f61767c20c93da45156fc4ebde604dc1.zip | |
x: clippy fixes
| -rw-r--r-- | src/tools/x/src/main.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/tools/x/src/main.rs b/src/tools/x/src/main.rs index b288cfcd5be..8c5735014df 100644 --- a/src/tools/x/src/main.rs +++ b/src/tools/x/src/main.rs @@ -89,7 +89,7 @@ fn exec_or_status(command: &mut Command) -> io::Result<ExitStatus> { fn handle_result(result: io::Result<ExitStatus>, cmd: Command) { match result { Err(error) => { - eprintln!("Failed to invoke `{:?}`: {}", cmd, error); + eprintln!("Failed to invoke `{cmd:?}`: {error}"); } Ok(status) => { process::exit(status.code().unwrap_or(1)); @@ -98,13 +98,10 @@ fn handle_result(result: io::Result<ExitStatus>, cmd: Command) { } fn main() { - match env::args().skip(1).next().as_deref() { - Some("--wrapper-version") => { - let version = env!("CARGO_PKG_VERSION"); - println!("{}", version); - return; - } - _ => {} + if env::args().nth(1).is_some_and(|s| s == "--wrapper-version") { + let version = env!("CARGO_PKG_VERSION"); + println!("{version}"); + return; } let current = match env::current_dir() { Ok(dir) => dir, |
