diff --git a/uefi/CHANGELOG.md b/uefi/CHANGELOG.md index 0e27766e7..31767db75 100644 --- a/uefi/CHANGELOG.md +++ b/uefi/CHANGELOG.md @@ -2,6 +2,7 @@ ## Changed - MSRV increased to 1.81. +- `core::error::Error` impls are no longer gated by the `unstable` feature. # uefi - 0.33.0 (2024-10-23) diff --git a/uefi/src/data_types/chars.rs b/uefi/src/data_types/chars.rs index c2f5bd63f..08ce168c0 100644 --- a/uefi/src/data_types/chars.rs +++ b/uefi/src/data_types/chars.rs @@ -15,7 +15,6 @@ impl Display for CharConversionError { } } -#[cfg(feature = "unstable")] impl core::error::Error for CharConversionError {} /// A Latin-1 character diff --git a/uefi/src/data_types/owned_strs.rs b/uefi/src/data_types/owned_strs.rs index 4f2f91bcf..856b0511a 100644 --- a/uefi/src/data_types/owned_strs.rs +++ b/uefi/src/data_types/owned_strs.rs @@ -32,7 +32,6 @@ impl Display for FromStrError { } } -#[cfg(feature = "unstable")] impl core::error::Error for FromStrError {} /// An owned UCS-2 null-terminated string. diff --git a/uefi/src/data_types/strs.rs b/uefi/src/data_types/strs.rs index 1239cda11..705639aa9 100644 --- a/uefi/src/data_types/strs.rs +++ b/uefi/src/data_types/strs.rs @@ -30,7 +30,6 @@ impl Display for FromSliceUntilNulError { } } -#[cfg(feature = "unstable")] impl core::error::Error for FromSliceUntilNulError {} /// Error converting from a slice (which cannot contain interior nuls) to a @@ -57,7 +56,6 @@ impl Display for FromSliceWithNulError { } } -#[cfg(feature = "unstable")] impl core::error::Error for FromSliceWithNulError {} /// Error returned by [`CStr16::from_unaligned_slice`]. @@ -88,7 +86,6 @@ impl Display for UnalignedCStr16Error { } } -#[cfg(feature = "unstable")] impl core::error::Error for UnalignedCStr16Error {} /// Error returned by [`CStr16::from_str_with_buf`]. @@ -115,7 +112,6 @@ impl Display for FromStrWithBufError { } } -#[cfg(feature = "unstable")] impl core::error::Error for FromStrWithBufError {} /// A null-terminated Latin-1 string. diff --git a/uefi/src/fs/file_system/error.rs b/uefi/src/fs/file_system/error.rs index d61784416..08b5f6d44 100644 --- a/uefi/src/fs/file_system/error.rs +++ b/uefi/src/fs/file_system/error.rs @@ -94,18 +94,16 @@ impl From for Error { } } -#[cfg(feature = "unstable")] impl core::error::Error for Error { fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { match self { - Error::Io(err) => Some(err), - Error::Path(err) => Some(err), - Error::Utf8Encoding(err) => Some(err), + Self::Io(err) => Some(err), + Self::Path(err) => Some(err), + Self::Utf8Encoding(err) => Some(err), } } } -#[cfg(feature = "unstable")] impl core::error::Error for IoError { fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { Some(&self.uefi_error) diff --git a/uefi/src/fs/path/validation.rs b/uefi/src/fs/path/validation.rs index 144073003..225b2d0f6 100644 --- a/uefi/src/fs/path/validation.rs +++ b/uefi/src/fs/path/validation.rs @@ -38,7 +38,6 @@ impl Display for PathError { } } -#[cfg(feature = "unstable")] impl core::error::Error for PathError {} /// Validates a path for the needs of the [`fs`] module. diff --git a/uefi/src/mem/memory_map/impl_.rs b/uefi/src/mem/memory_map/impl_.rs index e8397071f..8bbf9944b 100644 --- a/uefi/src/mem/memory_map/impl_.rs +++ b/uefi/src/mem/memory_map/impl_.rs @@ -25,7 +25,6 @@ impl Display for MemoryMapError { } } -#[cfg(feature = "unstable")] impl core::error::Error for MemoryMapError {} /// Implementation of [`MemoryMap`] for the given buffer. diff --git a/uefi/src/proto/boot_policy.rs b/uefi/src/proto/boot_policy.rs index d46edf2ff..27627b19d 100644 --- a/uefi/src/proto/boot_policy.rs +++ b/uefi/src/proto/boot_policy.rs @@ -20,7 +20,6 @@ impl Display for BootPolicyError { } } -#[cfg(feature = "unstable")] impl core::error::Error for BootPolicyError {} /// The UEFI boot policy is a property that influences the behaviour of diff --git a/uefi/src/proto/device_path/build.rs b/uefi/src/proto/device_path/build.rs index 3a09b2451..5a0000ade 100644 --- a/uefi/src/proto/device_path/build.rs +++ b/uefi/src/proto/device_path/build.rs @@ -189,7 +189,6 @@ impl Display for BuildError { } } -#[cfg(feature = "unstable")] impl core::error::Error for BuildError {} /// Trait for types that can be used to build a node via diff --git a/uefi/src/proto/device_path/mod.rs b/uefi/src/proto/device_path/mod.rs index 0d59beeed..77fabb4e4 100644 --- a/uefi/src/proto/device_path/mod.rs +++ b/uefi/src/proto/device_path/mod.rs @@ -704,12 +704,11 @@ impl Display for DevicePathToTextError { } } -#[cfg(feature = "unstable")] impl core::error::Error for DevicePathToTextError { fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { match self { - DevicePathToTextError::CantLocateHandleBuffer(e) => Some(e), - DevicePathToTextError::CantOpenProtocol(e) => Some(e), + Self::CantLocateHandleBuffer(e) => Some(e), + Self::CantOpenProtocol(e) => Some(e), _ => None, } } diff --git a/uefi/src/proto/driver/component_name.rs b/uefi/src/proto/driver/component_name.rs index 046bb5c49..f24b5fd75 100644 --- a/uefi/src/proto/driver/component_name.rs +++ b/uefi/src/proto/driver/component_name.rs @@ -248,7 +248,6 @@ impl Display for LanguageError { } } -#[cfg(feature = "unstable")] impl core::error::Error for LanguageError {} #[derive(Debug, PartialEq)] diff --git a/uefi/src/proto/media/file/info.rs b/uefi/src/proto/media/file/info.rs index 1ed1df8bf..ef046dc5b 100644 --- a/uefi/src/proto/media/file/info.rs +++ b/uefi/src/proto/media/file/info.rs @@ -137,7 +137,6 @@ impl Display for FileInfoCreationError { } } -#[cfg(feature = "unstable")] impl core::error::Error for FileInfoCreationError {} /// Generic file information diff --git a/uefi/src/proto/network/pxe.rs b/uefi/src/proto/network/pxe.rs index 84be71b18..82fce5ddb 100644 --- a/uefi/src/proto/network/pxe.rs +++ b/uefi/src/proto/network/pxe.rs @@ -1247,7 +1247,6 @@ impl Display for IcmpError { } } -#[cfg(feature = "unstable")] impl core::error::Error for IcmpError {} /// Corresponds to the anonymous union inside @@ -1294,7 +1293,6 @@ impl Display for TftpError { } } -#[cfg(feature = "unstable")] impl core::error::Error for TftpError {} /// Returned by [`BaseCode::tftp_read_dir`]. @@ -1337,5 +1335,4 @@ impl Display for ReadDirParseError { } } -#[cfg(feature = "unstable")] impl core::error::Error for ReadDirParseError {} diff --git a/uefi/src/proto/string/unicode_collation.rs b/uefi/src/proto/string/unicode_collation.rs index 2a023f4ea..dae70448f 100644 --- a/uefi/src/proto/string/unicode_collation.rs +++ b/uefi/src/proto/string/unicode_collation.rs @@ -171,5 +171,4 @@ impl Display for StrConversionError { } } -#[cfg(feature = "unstable")] impl core::error::Error for StrConversionError {} diff --git a/uefi/src/result/error.rs b/uefi/src/result/error.rs index 39f4696be..a19fb5352 100644 --- a/uefi/src/result/error.rs +++ b/uefi/src/result/error.rs @@ -68,5 +68,4 @@ impl Error { } } -#[cfg(feature = "unstable")] impl core::error::Error for Error {} diff --git a/uefi/src/runtime.rs b/uefi/src/runtime.rs index b8dfd9878..da98a7ab5 100644 --- a/uefi/src/runtime.rs +++ b/uefi/src/runtime.rs @@ -605,7 +605,6 @@ pub struct TimeError { pub daylight: bool, } -#[cfg(feature = "unstable")] impl core::error::Error for TimeError {} impl Display for TimeError {