diff options
| author | bors <bors@rust-lang.org> | 2014-04-23 03:21:32 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-23 03:21:32 -0700 |
| commit | 1ce0b98c7bad8c01e008ccbc790607f4bb26ec89 (patch) | |
| tree | b6a118b83a4875ac8f326cb4e968d7e4e46eee3c /src/libstd/io | |
| parent | 49b216539f52ae225dcf5280d52f1b5ee9e84474 (diff) | |
| parent | f686e5ebff1a8a30c496ffe38c9cd0fcde6307ce (diff) | |
| download | rust-1ce0b98c7bad8c01e008ccbc790607f4bb26ec89.tar.gz rust-1ce0b98c7bad8c01e008ccbc790607f4bb26ec89.zip | |
auto merge of #13692 : vadimcn/rust/Win64-pre, r=alexcrichton
Stack unwinding doesn't work yet, so this won't pass a lot of tests.
Diffstat (limited to 'src/libstd/io')
| -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) } }; |
