]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/wasi/mod.rs
Rename ErrorKind::Unknown to Uncategorized.
[rust.git] / library / std / src / sys / wasi / mod.rs
index 37f74fcc052e36b40e2a7f0c5148dfcf083019d4..4af99bfa464781d59aa7fbe79e97ce90d87ea855 100644 (file)
@@ -33,7 +33,6 @@
 pub mod net;
 pub mod os;
 pub use crate::sys_common::os_str_bytes as os_str;
-pub mod ext;
 #[path = "../unix/path.rs"]
 pub mod path;
 #[path = "../unsupported/pipe.rs"]
@@ -59,7 +58,7 @@
 pub fn decode_error_kind(errno: i32) -> std_io::ErrorKind {
     use std_io::ErrorKind::*;
     if errno > u16::MAX as i32 || errno < 0 {
-        return Other;
+        return Uncategorized;
     }
     match errno as u16 {
         wasi::ERRNO_CONNREFUSED => ConnectionRefused,
@@ -77,7 +76,8 @@ pub fn decode_error_kind(errno: i32) -> std_io::ErrorKind {
         wasi::ERRNO_EXIST => AlreadyExists,
         wasi::ERRNO_AGAIN => WouldBlock,
         wasi::ERRNO_NOSYS => Unsupported,
-        _ => Other,
+        wasi::ERRNO_NOMEM => OutOfMemory,
+        _ => Uncategorized,
     }
 }