diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 8dc3b516f35..816c6561207 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -778,9 +778,7 @@ impl RustDocFingerprint { .iter() .filter(|path| path.exists()) .map(|path| paths::remove_dir_all(&path)) - .filter(|res| res.is_err()) - .collect::>>() - .map(|_| ()) + .collect::>() } /// This function checks whether the latest version of `Rustc` used to compile this