pub fn insert(&mut self, key: K, value: V) {
            if let Some(index) = self.0.iter().position(|(k, _)| k == &key) {
                self.0[index] = (key, value);
            } else {
                self.0.push((key, value));
            }
        }
/// Insert a key-value pair in the map.
Insert a key-value pair in the map.
Insert a key - value pair in the map .
pub fn insert(&mut self, key: K, value: V) {
            if let Some(index) = self.0.iter().position(|(k, _)| k == &key) {
                self.0[index] = (key, value);
            } else {
                self.0.push((key, value));
            }
        }
pub fn insert ( & mut self , key : K , value : V ) { if let Some ( index ) = self . 0 . iter ( ) . position ( | ( k , _ ) | k == & key ) { self . 0 [ index ] = ( key , value ) ; } else { self . 0 . push ( ( key , value ) ) ; } }
Insert a key-value pair in the map.
Insert a key - value pair in the map .
&mut self
key
K
value
V
&mut self
key
K
value
V