fn clear_cache(&mut self) -> bool {
        // Bail out of the DFA if we're moving too "slowly."
        // A heuristic from RE2: assume the DFA is too slow if it is processing
        // 10 or fewer bytes per state.
        // Additionally, we permit the cache to be flushed a few times before
        // caling it quits.
        let nstates = self.cache.states.len();
        if self.cache.flush_count >= 3
            && self.at >= self.last_cache_flush
            && (self.at - self.last_cache_flush) <= 10 * nstates {
            return false;
        }
        // Update statistics tracking cache flushes.
        self.last_cache_flush = self.at;
        self.cache.flush_count += 1;

        // OK, actually flush the cache.
        let start = self.copy_state(self.start);
        self.cache.states.clear();
        self.cache.compiled.clear();
        for start in self.cache.start_states.iter_mut() {
            *start = STATE_UNKNOWN;
        }
        self.cache.states.push(State::invalid());
        self.cache.states.push(State::invalid());
        self.start = self.restore_state(start);
        true
    }
/// Wipes the state cache, but saves and restores the current start state.
///
/// This returns false if the cache is not cleared and the DFA should
/// give up.
Wipes the state cache, but saves and restores the current start state.
This returns false if the cache is not cleared and the DFA should
give up.
Wipes the state cache but saves and restores the current start state . This returns false if the cache is not cleared and the DFA should give up .
fn clear_cache(&mut self) -> bool {
        // Bail out of the DFA if we're moving too "slowly."
        // A heuristic from RE2: assume the DFA is too slow if it is processing
        // 10 or fewer bytes per state.
        // Additionally, we permit the cache to be flushed a few times before
        // caling it quits.
        let nstates = self.cache.states.len();
        if self.cache.flush_count >= 3
            && self.at >= self.last_cache_flush
            && (self.at - self.last_cache_flush) <= 10 * nstates {
            return false;
        }
        // Update statistics tracking cache flushes.
        self.last_cache_flush = self.at;
        self.cache.flush_count += 1;
        // OK, actually flush the cache.
        let start = self.copy_state(self.start);
        self.cache.states.clear();
        self.cache.compiled.clear();
        for start in self.cache.start_states.iter_mut() {
            *start = STATE_UNKNOWN;
        }
        self.cache.states.push(State::invalid());
        self.cache.states.push(State::invalid());
        self.start = self.restore_state(start);
        true
    }
fn clear_cache ( & mut self ) -> bool { // Bail out of the DFA if we're moving too "slowly." // A heuristic from RE2: assume the DFA is too slow if it is processing // 10 or fewer bytes per state. // Additionally, we permit the cache to be flushed a few times before // caling it quits. let nstates = self . cache . states . len ( ) ; if self . cache . flush_count >= 3 && self . at >= self . last_cache_flush && ( self . at - self . last_cache_flush ) <= 10 * nstates { return false ; } // Update statistics tracking cache flushes. self . last_cache_flush = self . at ; self . cache . flush_count += 1 ; // OK, actually flush the cache. let start = self . copy_state ( self . start ) ; self . cache . states . clear ( ) ; self . cache . compiled . clear ( ) ; for start in self . cache . start_states . iter_mut ( ) { * start = STATE_UNKNOWN ; } self . cache . states . push ( State :: invalid ( ) ) ; self . cache . states . push ( State :: invalid ( ) ) ; self . start = self . restore_state ( start ) ; true }
Wipes the state cache, but saves and restores the current start state.
Wipes the state cache but saves and restores the current start state .
&mut self
&mut self