diff --git a/crates/cargo-util/src/paths.rs b/crates/cargo-util/src/paths.rs index 743e3f3a88e..1172b002885 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 {