diff options
| author | Vadim Chugunov <vadimcn@gmail.com> | 2014-03-19 00:42:02 -0700 |
|---|---|---|
| committer | Vadim Chugunov <vadimcn@gmail.com> | 2014-04-22 18:08:06 -0700 |
| commit | f686e5ebff1a8a30c496ffe38c9cd0fcde6307ce (patch) | |
| tree | cd86e55f1f14e6da75efcaeced791c91804fa386 /src/libstd/io/stdio.rs | |
| parent | 6619134d49dc87d61274006be4c0d268658e1c2a (diff) | |
| download | rust-f686e5ebff1a8a30c496ffe38c9cd0fcde6307ce.tar.gz rust-f686e5ebff1a8a30c496ffe38c9cd0fcde6307ce.zip | |
Fixed Win64 build
Diffstat (limited to 'src/libstd/io/stdio.rs')
| -rw-r--r-- | src/libstd/io/stdio.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 96439439e7a..afef21e7c68 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -27,7 +27,6 @@ out.write(bytes!("Hello, world!")); */ -use container::Container; use fmt; use io::{Reader, Writer, IoResult, IoError, OtherIoError, standard_error, EndOfFile, LineBufferedWriter, BufferedReader}; @@ -37,11 +36,11 @@ use mem::replace; use option::{Option, Some, None}; use prelude::drop; use result::{Ok, Err}; +use rt; use rt::local::Local; use rt::rtio::{DontClose, IoFactory, LocalIo, RtioFileStream, RtioTTY}; use rt::task::Task; use str::StrSlice; -use slice::ImmutableVector; // And so begins the tale of acquiring a uv handle to a stdio stream on all // platforms in all situations. Our story begins by splitting the world into two @@ -236,18 +235,7 @@ fn with_task_stdout(f: |&mut Writer| -> IoResult<()> ) { } None => { - struct Stdout; - impl Writer for Stdout { - fn write(&mut self, data: &[u8]) -> IoResult<()> { - unsafe { - libc::write(libc::STDOUT_FILENO, - data.as_ptr() as *libc::c_void, - data.len() as libc::size_t); - } - Ok(()) // just ignore the results - } - } - let mut io = Stdout; + let mut io = rt::Stdout; f(&mut io as &mut Writer) } }; |
