about summary refs log tree commit diff
path: root/src/libregex
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-17 12:56:31 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-21 22:15:51 -0700
commit0169218047dc989acf9ea25e3122b9c659acb6b3 (patch)
tree8b1cd720a9e38c745359581e74d216a04e39e5ef /src/libregex
parent087b9283a0ed8df68f47ab07a25e60bc6a3ca050 (diff)
downloadrust-0169218047dc989acf9ea25e3122b9c659acb6b3.tar.gz
rust-0169218047dc989acf9ea25e3122b9c659acb6b3.zip
Fix fallout from Vec stabilization
Diffstat (limited to 'src/libregex')
-rw-r--r--src/libregex/compile.rs2
-rw-r--r--src/libregex/parse.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libregex/compile.rs b/src/libregex/compile.rs
index c4b517c5259..91c3da00162 100644
--- a/src/libregex/compile.rs
+++ b/src/libregex/compile.rs
@@ -156,7 +156,7 @@ impl<'r> Compiler<'r> {
             Capture(cap, name, x) => {
                 let len = self.names.len();
                 if cap >= len {
-                    self.names.grow(10 + cap - len, &None)
+                    self.names.grow(10 + cap - len, None)
                 }
                 *self.names.get_mut(cap) = name;
 
diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs
index ad60829c088..7f4289b128a 100644
--- a/src/libregex/parse.rs
+++ b/src/libregex/parse.rs
@@ -986,9 +986,9 @@ fn combine_ranges(unordered: Vec<(char, char)>) -> Vec<(char, char)> {
 // (or any of their negated forms). Note that this does not handle negation.
 fn perl_unicode_class(which: char) -> Vec<(char, char)> {
     match which.to_lowercase() {
-        'd' => Vec::from_slice(PERLD),
-        's' => Vec::from_slice(PERLS),
-        'w' => Vec::from_slice(PERLW),
+        'd' => PERLD.to_vec(),
+        's' => PERLS.to_vec(),
+        'w' => PERLW.to_vec(),
         _ => unreachable!(),
     }
 }
@@ -997,7 +997,7 @@ fn perl_unicode_class(which: char) -> Vec<(char, char)> {
 // `Cat` expression will never be a direct child of another `Cat` expression.
 fn concat_flatten(x: Ast, y: Ast) -> Ast {
     match (x, y) {
-        (Cat(mut xs), Cat(ys)) => { xs.push_all_move(ys); Cat(xs) }
+        (Cat(mut xs), Cat(ys)) => { xs.extend(ys.into_iter()); Cat(xs) }
         (Cat(mut xs), ast) => { xs.push(ast); Cat(xs) }
         (ast, Cat(mut xs)) => { xs.insert(0, ast); Cat(xs) }
         (ast1, ast2) => Cat(vec!(ast1, ast2)),
@@ -1019,7 +1019,7 @@ fn is_valid_cap(c: char) -> bool {
 
 fn find_class(classes: NamedClasses, name: &str) -> Option<Vec<(char, char)>> {
     match classes.binary_search(|&(s, _)| s.cmp(&name)) {
-        slice::Found(i) => Some(Vec::from_slice(classes[i].val1())),
+        slice::Found(i) => Some(classes[i].val1().to_vec()),
         slice::NotFound(_) => None,
     }
 }