about summary refs log tree commit diff
path: root/src/libregex/parse.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2014-09-24 23:41:09 +1200
committerNick Cameron <ncameron@mozilla.com>2014-10-07 15:49:53 +1300
commit59976942eacd26c0cc37247c3ac0c78b97edc6ea (patch)
tree81df79265eb8601f2965303b9626b80ee728208f /src/libregex/parse.rs
parentb5ba2f5517b1f90d07969ca3facdf5132e42436c (diff)
downloadrust-59976942eacd26c0cc37247c3ac0c78b97edc6ea.tar.gz
rust-59976942eacd26c0cc37247c3ac0c78b97edc6ea.zip
Use slice syntax instead of slice_to, etc.
Diffstat (limited to 'src/libregex/parse.rs')
-rw-r--r--src/libregex/parse.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs
index 7f4289b128a..bf576432631 100644
--- a/src/libregex/parse.rs
+++ b/src/libregex/parse.rs
@@ -511,7 +511,7 @@ impl<'a> Parser<'a> {
         self.chari = closer;
         let greed = try!(self.get_next_greedy());
         let inner = String::from_chars(
-            self.chars.as_slice().slice(start + 1, closer));
+            self.chars[start+1..closer]);
 
         // Parse the min and max values from the regex.
         let (mut min, mut max): (uint, Option<uint>);
@@ -944,7 +944,7 @@ impl<'a> Parser<'a> {
     }
 
     fn slice(&self, start: uint, end: uint) -> String {
-        String::from_chars(self.chars.as_slice().slice(start, end))
+        String::from_chars(self.chars[start..end])
     }
 }