fn on_remove(&self, key: &OwnerKey, value: &OwnerValue) {
        let index_key = (self.make_index_key_callback)(&value);

        let mut map = self.map.write()
            .unwrap_or_else(|err| unreachable!(err)); // unreachable because no code with possible panic under lock of this map

        let mut need_remove_index = false;
        if let Some(keys) = map.get_mut(&index_key) {
            keys.remove(key);
            if keys.is_empty() {
                need_remove_index = true;
            }
        }
        if need_remove_index {
            map.remove(&index_key);
        }
    }
/// Implementation of updating of index when remove operation on owner map.
Implementation of updating of index when remove operation on owner map.
Implementation of updating of index when remove operation on owner map .
fn on_remove(&self, key: &OwnerKey, value: &OwnerValue) {
        let index_key = (self.make_index_key_callback)(&value);
        let mut map = self.map.write()
            .unwrap_or_else(|err| unreachable!(err)); // unreachable because no code with possible panic under lock of this map
        let mut need_remove_index = false;
        if let Some(keys) = map.get_mut(&index_key) {
            keys.remove(key);
            if keys.is_empty() {
                need_remove_index = true;
            }
        }
        if need_remove_index {
            map.remove(&index_key);
        }
    }
fn on_remove ( & self , key : & OwnerKey , value : & OwnerValue ) { let index_key = ( self . make_index_key_callback ) ( & value ) ; let mut map = self . map . write ( ) . unwrap_or_else ( | err | unreachable ! ( err ) ) ; // unreachable because no code with possible panic under lock of this map let mut need_remove_index = false ; if let Some ( keys ) = map . get_mut ( & index_key ) { keys . remove ( key ) ; if keys . is_empty ( ) { need_remove_index = true ; } } if need_remove_index { map . remove ( & index_key ) ; } }
Implementation of updating of index when remove operation on owner map.
Implementation of updating of index when remove operation on owner map .
&self
key
&OwnerKey
value
&OwnerValue
&self
key
&OwnerKey
value
&OwnerValue