diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-02-10 21:45:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-10 21:45:16 +0100 |
| commit | d59ca59b90ff68b4360c54b023891122b40f16de (patch) | |
| tree | b8633b5b6c29cb2c8a5df43e491644ee65cfc5db /src/libstd/sys | |
| parent | 112629b9219d3a6d93c123a2d3b2b3b521371e5f (diff) | |
| parent | 541503afa13a4ea8596755e0e88e6dd13a95faa5 (diff) | |
| download | rust-d59ca59b90ff68b4360c54b023891122b40f16de.tar.gz rust-d59ca59b90ff68b4360c54b023891122b40f16de.zip | |
Rollup merge of #58295 - RalfJung:stdio, r=alexcrichton
std::sys::unix::stdio: explain why we do into_raw I was quite puzzled why someone would call `into_raw` and then ignore the result.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/stdio.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs index 8a6b7b5f876..715f2eafb2d 100644 --- a/src/libstd/sys/unix/stdio.rs +++ b/src/libstd/sys/unix/stdio.rs @@ -12,7 +12,7 @@ impl Stdin { pub fn read(&self, data: &mut [u8]) -> io::Result<usize> { let fd = FileDesc::new(libc::STDIN_FILENO); let ret = fd.read(data); - fd.into_raw(); + fd.into_raw(); // do not close this FD ret } } @@ -23,7 +23,7 @@ impl Stdout { pub fn write(&self, data: &[u8]) -> io::Result<usize> { let fd = FileDesc::new(libc::STDOUT_FILENO); let ret = fd.write(data); - fd.into_raw(); + fd.into_raw(); // do not close this FD ret } @@ -38,7 +38,7 @@ impl Stderr { pub fn write(&self, data: &[u8]) -> io::Result<usize> { let fd = FileDesc::new(libc::STDERR_FILENO); let ret = fd.write(data); - fd.into_raw(); + fd.into_raw(); // do not close this FD ret } |
