From bf9a8f4b689ef283f15cb30c33458252ec9704ac Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Sun, 25 Dec 2022 19:28:22 +0400 Subject: [PATCH] Fix the error handling on modern Rust See https://github.com/rust-lang/rust/pull/79965 --- efivar/src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/efivar/src/error.rs b/efivar/src/error.rs index b8f051f5..7b7fd243 100644 --- a/efivar/src/error.rs +++ b/efivar/src/error.rs @@ -38,7 +38,7 @@ fn is_variable_not_found_error(err: &io::Error) -> bool { #[cfg(target_os = "windows")] fn is_variable_not_found_error(err: &io::Error) -> bool { - err.kind() == io::ErrorKind::Other && err.raw_os_error() == Some(203) + err.raw_os_error() == Some(203) } #[cfg(not(target_os = "windows"))] @@ -49,7 +49,7 @@ fn is_buffer_too_small_error(_err: &io::Error) -> bool { #[cfg(target_os = "windows")] fn is_buffer_too_small_error(err: &io::Error) -> bool { - err.kind() == io::ErrorKind::Other && err.raw_os_error() == Some(122) + err.raw_os_error() == Some(122) } #[cfg(not(target_os = "windows"))] @@ -59,7 +59,7 @@ fn is_permission_denied_error(err: &io::Error) -> bool { #[cfg(target_os = "windows")] fn is_permission_denied_error(err: &io::Error) -> bool { - err.kind() == io::ErrorKind::Other && err.raw_os_error() == Some(1314) + err.raw_os_error() == Some(1314) } impl Error {