pub fn insert(&mut self, key: K, value: V) -> Option<V>
    {
	for page in self.0.iter_mut()
	{
	    match page.search_mut(&key) {
		Some((ref ok, ov)) if ok.eq(&key) => {
		    return Some(std::mem::replace(ov, value));
		},
		empty @ None => {
		    return empty.replace((key, value))
			.map(|(_, v)| v);
		},
		_ => (),
	    }
	}

	let mut page = Page::new();
	page.replace(key, value);
	self.0.push(page);
	None
    }
/// Insert a new key-value entry into this map, returning the pervious value if it was present
Insert a new key-value entry into this map, returning the pervious value if it was present
Insert a new key - value entry into this map returning the pervious value if it was present
pub fn insert(&mut self, key: K, value: V) -> Option<V>
    {
	for page in self.0.iter_mut()
	{
	    match page.search_mut(&key) {
		Some((ref ok, ov)) if ok.eq(&key) => {
		    return Some(std::mem::replace(ov, value));
		},
		empty @ None => {
		    return empty.replace((key, value))
			.map(|(_, v)| v);
		},
		_ => (),
	    }
	}
	let mut page = Page::new();
	page.replace(key, value);
	self.0.push(page);
	None
    }
pub fn insert ( & mut self , key : K , value : V ) -> Option < V > { for page in self . 0 . iter_mut ( ) { match page . search_mut ( & key ) { Some ( ( ref ok , ov ) ) if ok . eq ( & key ) => { return Some ( std :: mem :: replace ( ov , value ) ) ; } , empty @ None => { return empty . replace ( ( key , value ) ) . map ( | ( _ , v ) | v ) ; } , _ => ( ) , } } let mut page = Page :: new ( ) ; page . replace ( key , value ) ; self . 0 . push ( page ) ; None }
Insert a new key-value entry into this map, returning the pervious value if it was present
Insert a new key - value entry into this map returning the pervious value if it was present
&mut self
key
K
value
V