Bless clippy

This commit is contained in:
Oli Scherer 2024-06-28 08:56:30 +00:00
parent 92b837b89b
commit afec0abd59
2 changed files with 3 additions and 6 deletions

View file

@ -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 {

View file

@ -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) {