Rollup merge of #91668 - ChrisDenton:bootstrap-clean-error, r=Mark-Simulacrum

Remove the match on `ErrorKind::Other`

It's a) superfluous and b) doesn't work any more.
This commit is contained in:
Matthias Krüger 2021-12-10 22:41:22 +01:00 committed by GitHub
commit 0aa41bea97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,10 +75,10 @@ fn rm_rf(path: &Path) {
do_op(path, "remove dir", |p| {
fs::remove_dir(p).or_else(|e| {
// Check for dir not empty on Windows
// FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
// match on `e.kind()` instead.
#[cfg(windows)]
if matches!(e.kind(), std::io::ErrorKind::Other)
&& e.raw_os_error() == Some(145)
{
if e.raw_os_error() == Some(145) {
return Ok(());
}