Skip to content

Commit 2c37330

Browse files
uefi: Update Status documentation
The bit about "we can't use a Rust enum" is true of all the places we use `newtype_enum!`, so no need to call out `Status` in particular.
1 parent 2269109 commit 2c37330

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

uefi/src/result/status.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ const ERROR_BIT: usize = 1 << (core::mem::size_of::<usize>() * 8 - 1);
77
newtype_enum! {
88
/// UEFI uses status codes in order to report successes, errors, and warnings.
99
///
10-
/// Unfortunately, the spec allows and encourages implementation-specific
11-
/// non-portable status codes. Therefore, these cannot be modeled as a Rust
12-
/// enum, as injecting an unknown value in a Rust enum is undefined behaviour.
10+
/// The spec allows implementation-specific status codes, so the `Status`
11+
/// constants are not a comprehensive list of all possible values.
1312
///
14-
/// For lack of a better option, we therefore model them as a newtype of usize.
15-
///
16-
/// For a convenient integration into the Rust ecosystem, there are multiple
17-
/// factory methods to convert a Status into a [`uefi::Result`]:
13+
/// For a convenient integration into the Rust ecosystem, there are several
14+
/// methods to convert a Status into a [`uefi::Result`]:
1815
/// - [`Status::into_with`]
1916
/// - [`Status::into_with_val`]
2017
/// - [`Status::into_with_err`]

0 commit comments

Comments
 (0)