fn make_most_recent(&mut self, index: usize) {
        self.unlink_index(index);
        self.entries[index].as_occupied_mut().next = self.entries_head;
        if let Some(i) = self.entries_head {
            self.entries[i].as_occupied_mut().prev = Some(index);
        }
        self.entries_head = Some(index);

        // If this is the only entry, then unlinking it broke the tail.
        if self.entries_tail.is_none() {
            self.entries_tail = Some(index);
        }
    }
/// Given the index of an occupied entry, make it the most recent item.
Given the index of an occupied entry, make it the most recent item.
Given the index of an occupied entry make it the most recent item .
fn make_most_recent(&mut self, index: usize) {
        self.unlink_index(index);
        self.entries[index].as_occupied_mut().next = self.entries_head;
        if let Some(i) = self.entries_head {
            self.entries[i].as_occupied_mut().prev = Some(index);
        }
        self.entries_head = Some(index);
        // If this is the only entry, then unlinking it broke the tail.
        if self.entries_tail.is_none() {
            self.entries_tail = Some(index);
        }
    }
fn make_most_recent ( & mut self , index : usize ) { self . unlink_index ( index ) ; self . entries [ index ] . as_occupied_mut ( ) . next = self . entries_head ; if let Some ( i ) = self . entries_head { self . entries [ i ] . as_occupied_mut ( ) . prev = Some ( index ) ; } self . entries_head = Some ( index ) ; // If this is the only entry, then unlinking it broke the tail. if self . entries_tail . is_none ( ) { self . entries_tail = Some ( index ) ; } }
Given the index of an occupied entry, make it the most recent item.
Given the index of an occupied entry make it the most recent item .
&mut self
index
usize
&mut self
index
usize