auto merge of #13090 : thestinger/rust/iter, r=Aatch

This has been rendered obsolete by partial type hints. Since the `~[T]`
type is in the process of being removed, it needs to go away.
This commit is contained in:
bors 2014-03-23 02:41:53 -07:00
commit 11c6817e13
18 changed files with 48 additions and 61 deletions

View file

@ -76,7 +76,7 @@ fn main() {
format!("{}\t trees of depth {}\t check: {}",
iterations * 2, depth, chk)
})
}).to_owned_vec();
}).collect::<~[Future<~str>]>();
for message in messages.mut_iter() {
println!("{}", *message.get_ref());

View file

@ -62,7 +62,7 @@ pub fn main() {
assert!(map.pop(&Slice("foo")).is_some());
assert_eq!(map.move_iter().map(|(k, v)| k.to_str() + v.to_str())
.to_owned_vec()
.collect::<~[~str]>()
.concat(),
~"abc50bcd51cde52def53");
}

View file

@ -21,7 +21,7 @@ impl to_str for int {
impl<T:to_str> to_str for Vec<T> {
fn to_string(&self) -> ~str {
format!("[{}]", self.iter().map(|e| e.to_string()).to_owned_vec().connect(", "))
format!("[{}]", self.iter().map(|e| e.to_string()).collect::<~[~str]>().connect(", "))
}
}