From afec0abd599c17566a4fe53e6e31515dfd434f39 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 28 Jun 2024 08:56:30 +0000 Subject: [PATCH] Bless clippy --- src/tools/miri/miri-script/src/commands.rs | 6 ++---- src/tools/miri/miri-script/src/util.rs | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/tools/miri/miri-script/src/commands.rs b/src/tools/miri/miri-script/src/commands.rs index 57bdfbad9afb..62a3ab2c34cf 100644 --- a/src/tools/miri/miri-script/src/commands.rs +++ b/src/tools/miri/miri-script/src/commands.rs @@ -252,12 +252,11 @@ impl Command { // Fetch given rustc commit. cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git") .run() - .map_err(|e| { + .inspect_err(|_| { // Try to un-do the previous `git commit`, to leave the repo in the state we found it. cmd!(sh, "git reset --hard HEAD^") .run() .expect("FAILED to clean up again after failed `git fetch`, sorry for that"); - e }) .context("FAILED to fetch new commits, something went wrong (committing the rust-version file has been undone)")?; @@ -545,9 +544,8 @@ impl Command { if let Some(seed_range) = many_seeds { e.run_many_times(seed_range, |sh, seed| { eprintln!("Trying seed: {seed}"); - run_miri(sh, Some(format!("-Zmiri-seed={seed}"))).map_err(|err| { + run_miri(sh, Some(format!("-Zmiri-seed={seed}"))).inspect_err(|_| { eprintln!("FAILING SEED: {seed}"); - err }) })?; } else { diff --git a/src/tools/miri/miri-script/src/util.rs b/src/tools/miri/miri-script/src/util.rs index e9095a45fce7..e1b77be192e3 100644 --- a/src/tools/miri/miri-script/src/util.rs +++ b/src/tools/miri/miri-script/src/util.rs @@ -219,10 +219,9 @@ impl MiriEnv { break; } // Run the command with this seed. - run(&local_shell, cur).map_err(|err| { + run(&local_shell, cur).inspect_err(|_| { // If we failed, tell everyone about this. failed.store(true, Ordering::Relaxed); - err })?; // Check if some other command failed (in which case we'll stop as well). if failed.load(Ordering::Relaxed) {