diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-04-23 11:08:13 +0200 | 
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2013-04-24 22:26:09 +0200 | 
| commit | dd748079574197215da46ac164f16a392df9cc26 (patch) | |
| tree | dc080a272f782c967a375056d48de94eb48be56b /src/compiletest/errors.rs | |
| parent | e26f992d5e199a1ff8c26733650d254d63be066a (diff) | |
| download | rust-dd748079574197215da46ac164f16a392df9cc26.tar.gz rust-dd748079574197215da46ac164f16a392df9cc26.zip | |
Removed ascii functions from other modules
Replaced str::to_lowercase and str::to_uppercase
Diffstat (limited to 'src/compiletest/errors.rs')
| -rw-r--r-- | src/compiletest/errors.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index 5a5c091d957..bc9d694328b 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -50,7 +50,10 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] { while idx < len && line[idx] == (' ' as u8) { idx += 1u; } let start_kind = idx; while idx < len && line[idx] != (' ' as u8) { idx += 1u; } - let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned()); + + // FIXME: 4318 Instead of to_str_ascii, could use + // to_str_consume to not do a unneccessary copy. + let kind = str::slice(line, start_kind, idx).to_ascii().to_lower().to_str_ascii(); // Extract msg: while idx < len && line[idx] == (' ' as u8) { idx += 1u; } | 
