deprecate Vec::get

This commit is contained in:
Nick Cameron
2014-07-15 11:37:25 +12:00
parent b35d1a8368
commit aa760a849e
25 changed files with 91 additions and 88 deletions

View File

@@ -123,7 +123,7 @@ impl<'r, 't> Nfa<'r, 't> {
// Make sure multi-line mode isn't enabled for it, otherwise we can't
// drop the initial .*?
let prefix_anchor =
match *self.prog.insts.get(1) {
match self.prog.insts[1] {
EmptyBegin(flags) if flags & FLAG_MULTI == 0 => true,
_ => false,
};
@@ -192,7 +192,7 @@ impl<'r, 't> Nfa<'r, 't> {
fn step(&self, groups: &mut [Option<uint>], nlist: &mut Threads,
caps: &mut [Option<uint>], pc: uint)
-> StepState {
match *self.prog.insts.get(pc) {
match self.prog.insts[pc] {
Match => {
match self.which {
Exists => {
@@ -259,7 +259,7 @@ impl<'r, 't> Nfa<'r, 't> {
//
// We make a minor optimization by indicating that the state is "empty"
// so that its capture groups are not filled in.
match *self.prog.insts.get(pc) {
match self.prog.insts[pc] {
EmptyBegin(flags) => {
let multi = flags & FLAG_MULTI > 0;
nlist.add(pc, groups, true);
@@ -481,8 +481,8 @@ impl Threads {
#[inline]
fn contains(&self, pc: uint) -> bool {
let s = *self.sparse.get(pc);
s < self.size && self.queue.get(s).pc == pc
let s = self.sparse[pc];
s < self.size && self.queue[s].pc == pc
}
#[inline]
@@ -492,7 +492,7 @@ impl Threads {
#[inline]
fn pc(&self, i: uint) -> uint {
self.queue.get(i).pc
self.queue[i].pc
}
#[inline]