Skip to content

Commit 369be5c

Browse files
committed
Convert uses of str::connect to str::connect_ivec
1 parent 09cc957 commit 369be5c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/comp/util/ppaux.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
4747
let s = proto_to_str(proto);
4848
alt ident { some(i) { s += " "; s += i; } _ { } }
4949
s += "(";
50-
let strs = [];
51-
for a: arg in inputs { strs += [fn_input_to_str(cx, a)]; }
52-
s += str::connect(strs, ", ");
50+
let strs = ~[];
51+
for a: arg in inputs { strs += ~[fn_input_to_str(cx, a)]; }
52+
s += str::connect_ivec(strs, ", ");
5353
s += ")";
5454
if struct(cx, output) != ty_nil {
5555
alt cf {

src/test/stdtest/str.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ fn test_concat() {
7878

7979
#[test]
8080
fn test_connect() {
81-
fn t(v: &vec[str], sep: &str, s: &str) {
82-
assert (str::eq(str::connect(v, sep), s));
81+
fn t(v: &[str], sep: &str, s: &str) {
82+
assert (str::eq(str::connect_ivec(v, sep), s));
8383
}
84-
t(["you", "know", "I'm", "no", "good"], " ", "you know I'm no good");
85-
let v: vec[str] = [];
84+
t(~["you", "know", "I'm", "no", "good"], " ", "you know I'm no good");
85+
let v: [str] = ~[];
8686
t(v, " ", "");
87-
t(["hi"], " ", "hi");
87+
t(~["hi"], " ", "hi");
8888
}
8989

9090
#[test]

0 commit comments

Comments
 (0)