We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cbd428 commit 855570bCopy full SHA for 855570b
rand_core/src/os.rs
@@ -66,6 +66,14 @@ impl std::error::Error for OsError {
66
}
67
68
69
+// If [`RawOsError`](https://doc.rust-lang.org/std/io/type.RawOsError.html) is stablized, we can use it.
70
+
71
+#[cfg(not(target_os = "uefi"))]
72
+type RawOsError = i32;
73
74
+#[cfg(target_os = "uefi")]
75
+type RawOsError = usize;
76
77
impl OsError {
78
/// Extract the raw OS error code (if this error came from the OS)
79
///
@@ -75,7 +83,7 @@ impl OsError {
83
84
/// [1]: https://doc.rust-lang.org/std/io/struct.Error.html#method.raw_os_error
85
#[inline]
- pub fn raw_os_error(self) -> Option<i32> {
86
+ pub fn raw_os_error(self) -> Option<RawOsError> {
87
self.0.raw_os_error()
80
88
81
89
0 commit comments