about summary refs log tree commit diff
path: root/src/libstd/io
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-10 14:56:47 -0800
committerbors <bors@rust-lang.org>2014-02-10 14:56:47 -0800
commit38ed4674e8054ee854871303401bffed7c05b01b (patch)
tree59745ee9aa34079821e8afa2274a4bc83e98254d /src/libstd/io
parentcf9164f94c6a7e3717f67b1fb74a7662639835f0 (diff)
parente9ff91e9beb6c92d9662242c1090c507b1611c59 (diff)
auto merge of #11956 : edwardw/rust/issue-7556, r=cmr
Closes #7556.

Also move ``std::util::Void`` to ``std::any::Void``. It makes more sense to me.
Diffstat (limited to 'src/libstd/io')
-rw-r--r--src/libstd/io/fs.rs1
-rw-r--r--src/libstd/io/stdio.rs8
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs
index ef1b1a56ec0..cd6c6763f66 100644
--- a/src/libstd/io/fs.rs
+++ b/src/libstd/io/fs.rs
@@ -659,7 +659,6 @@ mod test {
     use io::fs::{File, rmdir, mkdir, readdir, rmdir_recursive,
                  mkdir_recursive, copy, unlink, stat, symlink, link,
                  readlink, chmod, lstat, change_file_times};
-    use util;
     use path::Path;
     use io;
     use ops::Drop;
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index 937ad0783e9..2cc0c67ff6a 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -32,6 +32,7 @@ use fmt;
 use io::{Reader, Writer, IoResult, IoError, OtherIoError,
          standard_error, EndOfFile, LineBufferedWriter};
 use libc;
+use mem::replace;
 use option::{Option, Some, None};
 use prelude::drop;
 use result::{Ok, Err};
@@ -39,7 +40,6 @@ use rt::local::Local;
 use rt::rtio::{DontClose, IoFactory, LocalIo, RtioFileStream, RtioTTY};
 use rt::task::Task;
 use str::StrSlice;
-use util;
 use vec::ImmutableVector;
 
 // And so begins the tale of acquiring a uv handle to a stdio stream on all
@@ -132,7 +132,7 @@ fn reset_helper(w: ~Writer,
 /// Note that this does not need to be called for all new tasks; the default
 /// output handle is to the process's stdout stream.
 pub fn set_stdout(stdout: ~Writer) -> Option<~Writer> {
-    reset_helper(stdout, |t, w| util::replace(&mut t.stdout, Some(w)))
+    reset_helper(stdout, |t, w| replace(&mut t.stdout, Some(w)))
 }
 
 /// Resets the task-local stderr handle to the specified writer
@@ -144,7 +144,7 @@ pub fn set_stdout(stdout: ~Writer) -> Option<~Writer> {
 /// Note that this does not need to be called for all new tasks; the default
 /// output handle is to the process's stderr stream.
 pub fn set_stderr(stderr: ~Writer) -> Option<~Writer> {
-    reset_helper(stderr, |t, w| util::replace(&mut t.stderr, Some(w)))
+    reset_helper(stderr, |t, w| replace(&mut t.stderr, Some(w)))
 }
 
 // Helper to access the local task's stdout handle
@@ -183,7 +183,7 @@ fn with_task_stdout(f: |&mut Writer| -> IoResult<()> ) {
             // temporarily take the task, swap the handles, put the task in TLS,
             // and only then drop the previous handle.
             let mut t = Local::borrow(None::<Task>);
-            let prev = util::replace(&mut t.get().stdout, my_stdout);
+            let prev = replace(&mut t.get().stdout, my_stdout);
             drop(t);
             drop(prev);
             ret