Skip to content

Commit

Permalink
De-~[] IO utils
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Apr 6, 2014
1 parent 49a8081 commit fcf9b30
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libstd/io/util.rs
Expand Up @@ -85,12 +85,12 @@ impl Reader for NullReader {

/// A `Writer` which multiplexes writes to a set of `Writers`.
pub struct MultiWriter {
writers: ~[~Writer]
writers: Vec<~Writer>
}

impl MultiWriter {
/// Creates a new `MultiWriter`
pub fn new(writers: ~[~Writer]) -> MultiWriter {
pub fn new(writers: Vec<~Writer>) -> MultiWriter {
MultiWriter { writers: writers }
}
}
Expand Down Expand Up @@ -273,8 +273,8 @@ mod test {
}
}

let mut multi = MultiWriter::new(~[~TestWriter as ~Writer,
~TestWriter as ~Writer]);
let mut multi = MultiWriter::new(vec!(~TestWriter as ~Writer,
~TestWriter as ~Writer));
multi.write([1, 2, 3]).unwrap();
assert_eq!(2, unsafe { writes });
assert_eq!(0, unsafe { flushes });
Expand All @@ -285,8 +285,8 @@ mod test {

#[test]
fn test_chained_reader() {
let rs = ~[MemReader::new(vec!(0, 1)), MemReader::new(vec!()),
MemReader::new(vec!(2, 3))];
let rs = vec!(MemReader::new(vec!(0, 1)), MemReader::new(vec!()),
MemReader::new(vec!(2, 3)));
let mut r = ChainedReader::new(rs.move_iter());
assert_eq!(vec!(0, 1, 2, 3), r.read_to_end().unwrap());
}
Expand Down

13 comments on commit fcf9b30

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at sfackler@fcf9b30

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sfackler/rust/io-vec = fcf9b30 into auto

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sfackler/rust/io-vec = fcf9b30 merged ok, testing candidate = c2691255

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at sfackler@fcf9b30

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sfackler/rust/io-vec = fcf9b30 into auto

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sfackler/rust/io-vec = fcf9b30 merged ok, testing candidate = 9d68cbbd

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at sfackler@fcf9b30

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sfackler/rust/io-vec = fcf9b30 into auto

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sfackler/rust/io-vec = fcf9b30 merged ok, testing candidate = e4779b5

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on fcf9b30 Apr 7, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = e4779b5

Please sign in to comment.