Skip to content

Commit

Permalink
Auto merge of #13706 - WaffleLapkin:don't-the-err, r=epage
Browse files Browse the repository at this point in the history
Don't depend on `?` affecting type inference in weird ways

This is likely to stop working in the future versions of Rust, see rust-lang/rust#122412 (comment).
  • Loading branch information
bors committed Apr 5, 2024
2 parents a9a0746 + 898969e commit 1570666
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/cargo-util/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ fn _remove_file(p: &Path) -> Result<()> {
}
}

Err(err).with_context(|| format!("failed to remove file `{}`", p.display()))?;
Ok(())
Err(err).with_context(|| format!("failed to remove file `{}`", p.display()))
}

fn set_not_readonly(p: &Path) -> io::Result<bool> {
Expand Down

0 comments on commit 1570666

Please sign in to comment.