From dd748079574197215da46ac164f16a392df9cc26 Mon Sep 17 00:00:00 2001 From: Marvin Löbel Date: Tue, 23 Apr 2013 11:08:13 +0200 Subject: Removed ascii functions from other modules Replaced str::to_lowercase and str::to_uppercase --- src/compiletest/errors.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/compiletest/errors.rs') 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; } -- cgit 1.4.1-3-g733a5