Change some instances of .connect() to .join()

This commit is contained in:
Wesley Wiser 2015-07-10 08:19:21 -04:00
parent 29c0c956bf
commit 93ddee6cee
39 changed files with 87 additions and 87 deletions

View file

@ -36,7 +36,7 @@ impl TTMacroExpander for Expander {
sp: Span,
_: &[ast::TokenTree]) -> Box<MacResult+'cx> {
let args = self.args.iter().map(|i| pprust::meta_item_to_string(&*i))
.collect::<Vec<_>>().connect(", ");
.collect::<Vec<_>>().join(", ");
let interned = token::intern_and_get_ident(&args[..]);
MacEager::expr(ecx.expr_str(sp, interned))
}

View file

@ -108,7 +108,7 @@ impl fmt::Display for AsciiArt {
.collect::<Vec<String>>();
// Concatenate the lines together using a new-line.
write!(f, "{}", lines.connect("\n"))
write!(f, "{}", lines.join("\n"))
}
}

View file

@ -24,7 +24,7 @@ impl<T:to_str> to_str for Vec<T> {
self.iter()
.map(|e| e.to_string_())
.collect::<Vec<String>>()
.connect(", "))
.join(", "))
}
}