diff --git a/crates/cargo-util/src/paths.rs b/crates/cargo-util/src/paths.rs index 743e3f3a8..1172b0028 100644 --- a/crates/cargo-util/src/paths.rs +++ b/crates/cargo-util/src/paths.rs @@ -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 {