Skip to content

Commit 4cb72b3

Browse files
committed
Adjust Usage of RawOsError
Inconsistently referenced through `std::sys` and `std::io`. Choosing `std::io` as the canonical source to make migration to `core::io` cleaner.
1 parent e1ef601 commit 4cb72b3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

library/std/src/sys/io/error/motor.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::io;
2-
use crate::sys::io::RawOsError;
32

4-
pub fn errno() -> RawOsError {
3+
pub fn errno() -> io::RawOsError {
54
// Not used in Motor OS because it is ambiguous: Motor OS
65
// is micro-kernel-based, and I/O happens via a shared-memory
76
// ring buffer, so an I/O operation that on a unix is a syscall
@@ -57,7 +56,7 @@ pub fn decode_error_kind(code: io::RawOsError) -> io::ErrorKind {
5756
}
5857
}
5958

60-
pub fn error_string(errno: RawOsError) -> String {
59+
pub fn error_string(errno: io::RawOsError) -> String {
6160
let error: moto_rt::Error = match errno {
6261
x if x < 0 => moto_rt::Error::Unknown,
6362
x if x > u16::MAX.into() => moto_rt::Error::Unknown,

0 commit comments

Comments
 (0)