Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tweak std lib vec fns in process.

This commit is contained in:
Graydon Hoare 2011-03-16 14:58:02 -07:00
parent 23eef4da22
commit 54587bdccb
29 changed files with 278 additions and 225 deletions

View file

@ -40,7 +40,7 @@ case (1) {
b += ns;
}
else {
b += t.(i);
_str.push_byte(b, t.(i));
}
i += 1u;
}

View file

@ -39,7 +39,7 @@ case (1) {
b += ns;
}
else {
b += t.(i);
_str.push_byte(b, t.(i));
}
i += 1u;
}

View file

@ -28,7 +28,7 @@ fn make_cumulative(vec[aminoacids] aa) -> vec[aminoacids] {
let vec[aminoacids] ans = vec();
for (aminoacids a in aa) {
cp += a._1;
ans += tup(a._0, cp);
ans += vec(tup(a._0, cp));
}
ret ans;
}
@ -59,7 +59,7 @@ fn make_random_fasta(str id, str desc, vec[aminoacids] genelist, int n) {
auto rng = myrandom(std.rand.mk_rng().next());
let str op = "";
for each (uint i in _uint.range(0u, n as uint)) {
op += select_random(rng.next(100u32), genelist) as u8;
_str.push_byte(op, select_random(rng.next(100u32), genelist) as u8);
if (_str.byte_len(op) >= LINE_LENGTH()) {
log(op);
op = "";
@ -76,7 +76,7 @@ fn make_repeat_fasta(str id, str desc, str s, int n) {
let uint sl = _str.byte_len(s);
for each (uint i in _uint.range(0u, n as uint)) {
op += s.(i % sl);
_str.push_byte(op, s.(i % sl));
if (_str.byte_len(op) >= LINE_LENGTH()) {
log(op);
op = "";