fn truncate_cache(&mut self, offset: usize) {
        let (line_num, ix) = match self.find_offset(offset) {
            Ok(ix) => (self.state.state_cache[ix].line_num, ix + 1),
            Err(ix) => (
                if ix == 0 { 0 } else {
                    self.state.state_cache[ix - 1].line_num
                },
                ix
            ),
        };
        self.truncate_frontier(line_num);
        self.state.state_cache.truncate(ix);
    }
/// Release all state _after_ the given offset.
Release all state _after_ the given offset.
Release all state _after_ the given offset .
fn truncate_cache(&mut self, offset: usize) {
        let (line_num, ix) = match self.find_offset(offset) {
            Ok(ix) => (self.state.state_cache[ix].line_num, ix + 1),
            Err(ix) => (
                if ix == 0 { 0 } else {
                    self.state.state_cache[ix - 1].line_num
                },
                ix
            ),
        };
        self.truncate_frontier(line_num);
        self.state.state_cache.truncate(ix);
    }
fn truncate_cache ( & mut self , offset : usize ) { let ( line_num , ix ) = match self . find_offset ( offset ) { Ok ( ix ) => ( self . state . state_cache [ ix ] . line_num , ix + 1 ) , Err ( ix ) => ( if ix == 0 { 0 } else { self . state . state_cache [ ix - 1 ] . line_num } , ix ) , } ; self . truncate_frontier ( line_num ) ; self . state . state_cache . truncate ( ix ) ; }
Release all state _after_ the given offset.
Release all state _after_ the given offset .
&mut self
offset
usize