From 898969e4a4bd78be8334c7ddd201b571e7c7e0a7 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 4 Apr 2024 23:56:01 +0000 Subject: [PATCH] Don't depend on `?` affecting type inference in weird ways --- crates/cargo-util/src/paths.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 {