about summary refs log tree commit diff
path: root/library/std/src/sys/stdio/unix.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-23 06:23:51 +0000
committerbors <bors@rust-lang.org>2025-03-23 06:23:51 +0000
commit60a3084f64607e86dd7715d72f11764cd500c364 (patch)
treeb6abe6c3d8f0e42e6cea362f761a29f080c23789 /library/std/src/sys/stdio/unix.rs
parentf08d5c01e69436891ff1c181385d0e078a8482ec (diff)
parentf6e90d804a82cce1606596f6116402843794deb3 (diff)
downloadrust-60a3084f64607e86dd7715d72f11764cd500c364.tar.gz
rust-60a3084f64607e86dd7715d72f11764cd500c364.zip
Auto merge of #136769 - thaliaarchi:io-optional-methods/stdio, r=joboet
Provide optional `Read`/`Write` methods for stdio

Override more of the default methods for `io::Read` and `io::Write` for stdio types, when efficient to do so, and deduplicate unsupported types.

Tracked in https://github.com/rust-lang/rust/issues/136756.

try-job: x86_64-msvc-1
Diffstat (limited to 'library/std/src/sys/stdio/unix.rs')
-rw-r--r--library/std/src/sys/stdio/unix.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/std/src/sys/stdio/unix.rs b/library/std/src/sys/stdio/unix.rs
index 08a06e0da9f..8535e3539e9 100644
--- a/library/std/src/sys/stdio/unix.rs
+++ b/library/std/src/sys/stdio/unix.rs
@@ -11,13 +11,13 @@ use crate::os::hermit::io::FromRawFd;
 use crate::os::unix::io::FromRawFd;
 use crate::sys::fd::FileDesc;
 
-pub struct Stdin(());
-pub struct Stdout(());
-pub struct Stderr(());
+pub struct Stdin;
+pub struct Stdout;
+pub struct Stderr;
 
 impl Stdin {
     pub const fn new() -> Stdin {
-        Stdin(())
+        Stdin
     }
 }
 
@@ -42,7 +42,7 @@ impl io::Read for Stdin {
 
 impl Stdout {
     pub const fn new() -> Stdout {
-        Stdout(())
+        Stdout
     }
 }
 
@@ -68,7 +68,7 @@ impl io::Write for Stdout {
 
 impl Stderr {
     pub const fn new() -> Stderr {
-        Stderr(())
+        Stderr
     }
 }