summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-06-10 00:44:58 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-06-10 23:02:54 +1000
commitc32fb53cf9ae20a657d17bd8e2f0b36863096583 (patch)
tree928280b4bfcde6b9765de76f956624a735eafde9 /src/compiletest
parentb29cd22bce6325a60788ab84f989bd2e82fcaaf4 (diff)
downloadrust-c32fb53cf9ae20a657d17bd8e2f0b36863096583.tar.gz
rust-c32fb53cf9ae20a657d17bd8e2f0b36863096583.zip
std: remove str::{len, slice, is_empty} in favour of methods.
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/errors.rs8
-rw-r--r--src/compiletest/header.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index 728548caf77..575df0268d6 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -33,13 +33,13 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
     let mut idx;
     match str::find_str(line, error_tag) {
       None => return ~[],
-      Some(nn) => { idx = (nn as uint) + str::len(error_tag); }
+      Some(nn) => { idx = (nn as uint) + error_tag.len(); }
     }
 
     // "//~^^^ kind msg" denotes a message expected
     // three lines above current line:
     let mut adjust_line = 0u;
-    let len = str::len(line);
+    let len = line.len();
     while idx < len && line[idx] == ('^' as u8) {
         adjust_line += 1u;
         idx += 1u;
@@ -52,12 +52,12 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
 
     // FIXME: #4318 Instead of to_ascii and to_str_ascii, could use
     // to_ascii_consume and to_str_consume to not do a unnecessary copy.
-    let kind = str::slice(line, start_kind, idx);
+    let kind = line.slice(start_kind, idx);
     let kind = kind.to_ascii().to_lower().to_str_ascii();
 
     // Extract msg:
     while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
-    let msg = str::slice(line, idx, len).to_owned();
+    let msg = line.slice(idx, len).to_owned();
 
     debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
 
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index 153a8de8029..c61adff0063 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -177,8 +177,8 @@ fn parse_name_value_directive(line: &str,
     let keycolon = directive + ":";
     match str::find_str(line, keycolon) {
         Some(colon) => {
-            let value = str::slice(line, colon + str::len(keycolon),
-                                   str::len(line)).to_owned();
+            let value = line.slice(colon + keycolon.len(),
+                                   line.len()).to_owned();
             debug!("%s: %s", directive,  value);
             Some(value)
         }