about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-23 00:45:25 -0800
committerMarijn Haverbeke <marijnh@gmail.com>2012-02-23 17:00:19 +0100
commit1b957c0942007e60ec9ea6773c964ea7bdc199af (patch)
tree4fc4660ec4d8e9fd02a61fcae1ab073f60e89772 /src/comp/syntax/parse
parentcec053487c84e8b5406e24d6f9f72966cdcfd0da (diff)
downloadrust-1b957c0942007e60ec9ea6773c964ea7bdc199af.tar.gz
rust-1b957c0942007e60ec9ea6773c964ea7bdc199af.zip
(core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes with find[_from]
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/lexer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index 113ca056ed4..0328afc9f20 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -24,7 +24,7 @@ impl reader for reader {
     fn get_str_from(start: uint) -> str unsafe {
         // I'm pretty skeptical about this subtraction. What if there's a
         // multi-byte character before the mark?
-        ret str::unsafe::slice_bytes(*self.src, start - 1u, self.pos - 1u);
+        ret str::slice(*self.src, start - 1u, self.pos - 1u);
     }
     fn next() -> char {
         if self.pos < self.len {
@@ -611,7 +611,7 @@ fn trim_whitespace_prefix_and_push_line(&lines: [str],
     let s1;
     if all_whitespace(s, 0u, col) {
         if col < str::len_bytes(s) {
-            s1 = str::unsafe::slice_bytes(s, col, str::len_bytes(s));
+            s1 = str::slice(s, col, str::len_bytes(s));
         } else { s1 = ""; }
     } else { s1 = s; }
     log(debug, "pushing line: " + s1);