about summary refs log tree commit diff
path: root/src/libregex/compile.rs
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-07 11:58:31 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-07 17:35:56 -0500
commit517f1cc63c1a5df148fdeef56791f66771d3d8e8 (patch)
tree0d321b5be3d9610f460561e8dc446a2132bb5422 /src/libregex/compile.rs
parent6e2bfe4ae8277f0cfe76831b446d50820b4527f5 (diff)
downloadrust-517f1cc63c1a5df148fdeef56791f66771d3d8e8.tar.gz
rust-517f1cc63c1a5df148fdeef56791f66771d3d8e8.zip
use slicing sugar
Diffstat (limited to 'src/libregex/compile.rs')
-rw-r--r--src/libregex/compile.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libregex/compile.rs b/src/libregex/compile.rs
index 5803da1d335..d29a7a425c1 100644
--- a/src/libregex/compile.rs
+++ b/src/libregex/compile.rs
@@ -105,7 +105,7 @@ impl Program {
         // This is a bit hacky since we have to skip over the initial
         // 'Save' instruction.
         let mut pre = String::with_capacity(5);
-        for inst in c.insts.index(&(1..)).iter() {
+        for inst in c.insts[1..].iter() {
             match *inst {
                 OneChar(c, FLAG_EMPTY) => pre.push(c),
                 _ => break