diff options
| author | Ralf Jung <post@ralfj.de> | 2019-02-08 11:41:01 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-02-08 11:41:31 +0100 |
| commit | 541503afa13a4ea8596755e0e88e6dd13a95faa5 (patch) | |
| tree | 70e5ecc0751513ce7505d0481b0208c8fcb91ea6 | |
| parent | d30b99f9c23f8e1d6ef993cc94da96510ad709b3 (diff) | |
| download | rust-541503afa13a4ea8596755e0e88e6dd13a95faa5.tar.gz rust-541503afa13a4ea8596755e0e88e6dd13a95faa5.zip | |
std::sys::unix::stdio: explain why we do into_raw
| -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 } |
