diff options
| author | Graydon Hoare <[email protected]> | 2011-03-16 14:58:02 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-16 14:58:02 -0700 |
| commit | 54587bdccb7b6771cfc704a30fc0ef2c65824a15 (patch) | |
| tree | 6f154f9b038e9542b364e87ae887858a96bdb4a9 /src/test/bench/shootout | |
| parent | Add some more dlopen-related suppressions for the Mac (diff) | |
| download | rust-54587bdccb7b6771cfc704a30fc0ef2c65824a15.tar.xz rust-54587bdccb7b6771cfc704a30fc0ef2c65824a15.zip | |
Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tweak std lib vec fns in process.
Diffstat (limited to 'src/test/bench/shootout')
| -rw-r--r-- | src/test/bench/shootout/fasta.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/bench/shootout/fasta.rs b/src/test/bench/shootout/fasta.rs index ffec6db9..f88f4330 100644 --- a/src/test/bench/shootout/fasta.rs +++ b/src/test/bench/shootout/fasta.rs @@ -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 = ""; |