pub fn insert(&mut self, head: &str, previous: Option<&str>) -> Option<String> {
        if self.cache.get(head).is_some() {
            return None;
        }

        let expired = self.take_previous_if_some(previous);

        self.insert_new_fork(head);

        expired
    }
/// Insert a new fork. If `previous` is not None and it exists, it is removed and returned.
/// Inserting the same `head` twice has no affect.
Insert a new fork. If `previous` is not None and it exists, it is removed and returned.
Inserting the same `head` twice has no affect.
Insert a new fork . If ` previous ` is not None and it exists it is removed and returned . Inserting the same ` head ` twice has no affect .
pub fn insert(&mut self, head: &str, previous: Option<&str>) -> Option<String> {
        if self.cache.get(head).is_some() {
            return None;
        }
        let expired = self.take_previous_if_some(previous);
        self.insert_new_fork(head);
        expired
    }
pub fn insert ( & mut self , head : & str , previous : Option < & str > ) -> Option < String > { if self . cache . get ( head ) . is_some ( ) { return None ; } let expired = self . take_previous_if_some ( previous ) ; self . insert_new_fork ( head ) ; expired }
Insert a new fork.
Insert a new fork .
&mut self
head
&str
previous
Option<&str>