diff options
| author | bors <bors@rust-lang.org> | 2013-03-21 19:39:53 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-21 19:39:53 -0700 |
| commit | 5f2d4102c5dabde915f1f6cb99c38b9274790cda (patch) | |
| tree | ef06cf4055b220ccc73f5dcd6c3c62faf53da292 /src/test/bench | |
| parent | d8c0da39402818db2d41369826956538ba9672e1 (diff) | |
| parent | 0a47cd5ef183d5a7e763484e211f4b3aed6d72de (diff) | |
| download | rust-5f2d4102c5dabde915f1f6cb99c38b9274790cda.tar.gz rust-5f2d4102c5dabde915f1f6cb99c38b9274790cda.zip | |
auto merge of #5479 : Kimundi/rust/str-dealloc, r=z0w0
This makes the `trim` and `substr` functions return a slice instead of an `~str`, and removes the unnecessary `Trimmable` trait (`StrSlice` already contains the same functionality). Also moves the `ToStr` implementations for the three str types into the str module in anticipation of further untangling.
Diffstat (limited to 'src/test/bench')
| -rw-r--r-- | src/test/bench/sudoku.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/bench/sudoku.rs b/src/test/bench/sudoku.rs index 92320986ae8..ae92be6a4de 100644 --- a/src/test/bench/sudoku.rs +++ b/src/test/bench/sudoku.rs @@ -67,7 +67,8 @@ pub impl Sudoku { let mut g = vec::from_fn(10u, { |_i| ~[0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8] }); while !reader.eof() { - let comps = str::split_char(str::trim(reader.read_line()), ','); + let line = reader.read_line(); + let comps = str::split_char(line.trim(), ','); if vec::len(comps) == 3u { let row = uint::from_str(comps[0]).get() as u8; let col = uint::from_str(comps[1]).get() as u8; |
