about summary refs log tree commit diff
path: root/library/std/src/sys/io/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/io/mod.rs')
-rw-r--r--library/std/src/sys/io/mod.rs29
1 files changed, 18 insertions, 11 deletions
diff --git a/library/std/src/sys/io/mod.rs b/library/std/src/sys/io/mod.rs
index ae75f4d97b4..fe8ec1dbb73 100644
--- a/library/std/src/sys/io/mod.rs
+++ b/library/std/src/sys/io/mod.rs
@@ -1,20 +1,24 @@
 #![forbid(unsafe_op_in_unsafe_fn)]
 
 mod io_slice {
-    cfg_if::cfg_if! {
-        if #[cfg(any(target_family = "unix", target_os = "hermit", target_os = "solid_asp3", target_os = "trusty"))] {
+    cfg_select! {
+        any(target_family = "unix", target_os = "hermit", target_os = "solid_asp3", target_os = "trusty") => {
             mod iovec;
             pub use iovec::*;
-        } else if #[cfg(target_os = "windows")] {
+        }
+        target_os = "windows" => {
             mod windows;
             pub use windows::*;
-        } else if #[cfg(target_os = "wasi")] {
+        }
+        target_os = "wasi" => {
             mod wasi;
             pub use wasi::*;
-        } else if #[cfg(target_os = "uefi")] {
+        }
+        target_os = "uefi" => {
             mod uefi;
             pub use uefi::*;
-        } else {
+        }
+        _ => {
             mod unsupported;
             pub use unsupported::*;
         }
@@ -22,17 +26,20 @@ mod io_slice {
 }
 
 mod is_terminal {
-    cfg_if::cfg_if! {
-        if #[cfg(any(target_family = "unix", target_os = "wasi"))] {
+    cfg_select! {
+        any(target_family = "unix", target_os = "wasi") => {
             mod isatty;
             pub use isatty::*;
-        } else if #[cfg(target_os = "windows")] {
+        }
+        target_os = "windows" => {
             mod windows;
             pub use windows::*;
-        } else if #[cfg(target_os = "hermit")] {
+        }
+        target_os = "hermit" => {
             mod hermit;
             pub use hermit::*;
-        } else {
+        }
+        _ => {
             mod unsupported;
             pub use unsupported::*;
         }