Skip to content

Commit dfbed8e

Browse files
authored
Merge pull request #1497 from nicholasbishop/bishop-error-stable
Remove unstable gate for `core::error::Error` impls
2 parents 048896a + 06744d5 commit dfbed8e

File tree

16 files changed

+6
-26
lines changed

16 files changed

+6
-26
lines changed

uefi/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Changed
44
- MSRV increased to 1.81.
5+
- `core::error::Error` impls are no longer gated by the `unstable` feature.
56

67

78
# uefi - 0.33.0 (2024-10-23)

uefi/src/data_types/chars.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ impl Display for CharConversionError {
1515
}
1616
}
1717

18-
#[cfg(feature = "unstable")]
1918
impl core::error::Error for CharConversionError {}
2019

2120
/// A Latin-1 character

uefi/src/data_types/owned_strs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ impl Display for FromStrError {
3232
}
3333
}
3434

35-
#[cfg(feature = "unstable")]
3635
impl core::error::Error for FromStrError {}
3736

3837
/// An owned UCS-2 null-terminated string.

uefi/src/data_types/strs.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ impl Display for FromSliceUntilNulError {
3030
}
3131
}
3232

33-
#[cfg(feature = "unstable")]
3433
impl core::error::Error for FromSliceUntilNulError {}
3534

3635
/// Error converting from a slice (which cannot contain interior nuls) to a
@@ -57,7 +56,6 @@ impl Display for FromSliceWithNulError {
5756
}
5857
}
5958

60-
#[cfg(feature = "unstable")]
6159
impl core::error::Error for FromSliceWithNulError {}
6260

6361
/// Error returned by [`CStr16::from_unaligned_slice`].
@@ -88,7 +86,6 @@ impl Display for UnalignedCStr16Error {
8886
}
8987
}
9088

91-
#[cfg(feature = "unstable")]
9289
impl core::error::Error for UnalignedCStr16Error {}
9390

9491
/// Error returned by [`CStr16::from_str_with_buf`].
@@ -115,7 +112,6 @@ impl Display for FromStrWithBufError {
115112
}
116113
}
117114

118-
#[cfg(feature = "unstable")]
119115
impl core::error::Error for FromStrWithBufError {}
120116

121117
/// A null-terminated Latin-1 string.

uefi/src/fs/file_system/error.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,16 @@ impl From<PathError> for Error {
9494
}
9595
}
9696

97-
#[cfg(feature = "unstable")]
9897
impl core::error::Error for Error {
9998
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
10099
match self {
101-
Error::Io(err) => Some(err),
102-
Error::Path(err) => Some(err),
103-
Error::Utf8Encoding(err) => Some(err),
100+
Self::Io(err) => Some(err),
101+
Self::Path(err) => Some(err),
102+
Self::Utf8Encoding(err) => Some(err),
104103
}
105104
}
106105
}
107106

108-
#[cfg(feature = "unstable")]
109107
impl core::error::Error for IoError {
110108
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
111109
Some(&self.uefi_error)

uefi/src/fs/path/validation.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ impl Display for PathError {
3838
}
3939
}
4040

41-
#[cfg(feature = "unstable")]
4241
impl core::error::Error for PathError {}
4342

4443
/// Validates a path for the needs of the [`fs`] module.

uefi/src/mem/memory_map/impl_.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ impl Display for MemoryMapError {
2525
}
2626
}
2727

28-
#[cfg(feature = "unstable")]
2928
impl core::error::Error for MemoryMapError {}
3029

3130
/// Implementation of [`MemoryMap`] for the given buffer.

uefi/src/proto/boot_policy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ impl Display for BootPolicyError {
2020
}
2121
}
2222

23-
#[cfg(feature = "unstable")]
2423
impl core::error::Error for BootPolicyError {}
2524

2625
/// The UEFI boot policy is a property that influences the behaviour of

uefi/src/proto/device_path/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ impl Display for BuildError {
189189
}
190190
}
191191

192-
#[cfg(feature = "unstable")]
193192
impl core::error::Error for BuildError {}
194193

195194
/// Trait for types that can be used to build a node via

uefi/src/proto/device_path/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,12 +704,11 @@ impl Display for DevicePathToTextError {
704704
}
705705
}
706706

707-
#[cfg(feature = "unstable")]
708707
impl core::error::Error for DevicePathToTextError {
709708
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
710709
match self {
711-
DevicePathToTextError::CantLocateHandleBuffer(e) => Some(e),
712-
DevicePathToTextError::CantOpenProtocol(e) => Some(e),
710+
Self::CantLocateHandleBuffer(e) => Some(e),
711+
Self::CantOpenProtocol(e) => Some(e),
713712
_ => None,
714713
}
715714
}

uefi/src/proto/driver/component_name.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ impl Display for LanguageError {
248248
}
249249
}
250250

251-
#[cfg(feature = "unstable")]
252251
impl core::error::Error for LanguageError {}
253252

254253
#[derive(Debug, PartialEq)]

uefi/src/proto/media/file/info.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ impl Display for FileInfoCreationError {
137137
}
138138
}
139139

140-
#[cfg(feature = "unstable")]
141140
impl core::error::Error for FileInfoCreationError {}
142141

143142
/// Generic file information

uefi/src/proto/network/pxe.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,6 @@ impl Display for IcmpError {
12471247
}
12481248
}
12491249

1250-
#[cfg(feature = "unstable")]
12511250
impl core::error::Error for IcmpError {}
12521251

12531252
/// Corresponds to the anonymous union inside
@@ -1294,7 +1293,6 @@ impl Display for TftpError {
12941293
}
12951294
}
12961295

1297-
#[cfg(feature = "unstable")]
12981296
impl core::error::Error for TftpError {}
12991297

13001298
/// Returned by [`BaseCode::tftp_read_dir`].
@@ -1337,5 +1335,4 @@ impl Display for ReadDirParseError {
13371335
}
13381336
}
13391337

1340-
#[cfg(feature = "unstable")]
13411338
impl core::error::Error for ReadDirParseError {}

uefi/src/proto/string/unicode_collation.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,4 @@ impl Display for StrConversionError {
171171
}
172172
}
173173

174-
#[cfg(feature = "unstable")]
175174
impl core::error::Error for StrConversionError {}

uefi/src/result/error.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,4 @@ impl<Data: Debug> Error<Data> {
6868
}
6969
}
7070

71-
#[cfg(feature = "unstable")]
7271
impl<Data: Debug> core::error::Error for Error<Data> {}

uefi/src/runtime.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ pub struct TimeError {
605605
pub daylight: bool,
606606
}
607607

608-
#[cfg(feature = "unstable")]
609608
impl core::error::Error for TimeError {}
610609

611610
impl Display for TimeError {

0 commit comments

Comments
 (0)