fn insert_entry(&mut self, line_num: usize, offset: usize, user_state: Option<S>) -> usize {
        if self.state.state_cache.len() >= CACHE_SIZE {
            self.evict();
        }
        match self.find_line(line_num) {
            Ok(_ix) => panic!("entry already exists"),
            Err(ix) => {
                self.state.state_cache.insert(ix, CacheEntry {
                    line_num, offset, user_state
                });
                ix
            }
        }
    }
/// Insert a new entry into the cache, returning its index.
Insert a new entry into the cache, returning its index.
Insert a new entry into the cache returning its index .
fn insert_entry(&mut self, line_num: usize, offset: usize, user_state: Option<S>) -> usize {
        if self.state.state_cache.len() >= CACHE_SIZE {
            self.evict();
        }
        match self.find_line(line_num) {
            Ok(_ix) => panic!("entry already exists"),
            Err(ix) => {
                self.state.state_cache.insert(ix, CacheEntry {
                    line_num, offset, user_state
                });
                ix
            }
        }
    }
fn insert_entry ( & mut self , line_num : usize , offset : usize , user_state : Option < S > ) -> usize { if self . state . state_cache . len ( ) >= CACHE_SIZE { self . evict ( ) ; } match self . find_line ( line_num ) { Ok ( _ix ) => panic ! ( " " ) , Err ( ix ) => { self . state . state_cache . insert ( ix , CacheEntry { line_num , offset , user_state } ) ; ix } } }
Insert a new entry into the cache, returning its index.
Insert a new entry into the cache returning its index .
&mut self
line_num
usize
offset
usize
user_state
Option<S>