pub fn replace_entry(self, value: V) -> (K, V) {
        let (old_key, old_value) =
            unsafe { (&mut *self.hash_entry.key(), &mut *self.hash_entry.value()) };
        let old_key = mem::replace(old_key, self.key.unwrap());
        let old_value = mem::replace(old_value, value);
        (old_key, old_value)
    }
/// Replaces the entry, returning the old key and value. The new key in the hash map will be
/// the key used to create this entry.
///
/// # Examples
///
/// ```
/// use hash_ord::hash_map::{HashMap, Entry};
/// use std::rc::Rc;
///
/// let mut map: HashMap<Rc<String>, u32> = HashMap::new();
/// map.insert(Rc::new("Stringthing".to_string()), 15);
///
/// let my_key = Rc::new("Stringthing".to_string());
///
/// if let Entry::Occupied(entry) = map.entry(my_key) {
///     // Also replace the key with a handle to our other key.
///     let (old_key, old_value): (Rc<String>, u32) = entry.replace_entry(16);
///     assert_eq!(Rc::strong_count(&old_key), 1);
///     assert!(old_value == 15);
/// }
///
/// ```
Replaces the entry, returning the old key and value. The new key in the hash map will be
the key used to create this entry.
Replaces the entry returning the old key and value . The new key in the hash map will be the key used to create this entry .
pub fn replace_entry(self, value: V) -> (K, V) {
        let (old_key, old_value) =
            unsafe { (&mut *self.hash_entry.key(), &mut *self.hash_entry.value()) };
        let old_key = mem::replace(old_key, self.key.unwrap());
        let old_value = mem::replace(old_value, value);
        (old_key, old_value)
    }
pub fn replace_entry ( self , value : V ) -> ( K , V ) { let ( old_key , old_value ) = unsafe { ( & mut * self . hash_entry . key ( ) , & mut * self . hash_entry . value ( ) ) } ; let old_key = mem :: replace ( old_key , self . key . unwrap ( ) ) ; let old_value = mem :: replace ( old_value , value ) ; ( old_key , old_value ) }
Replaces the entry, returning the old key and value.
Replaces the entry returning the old key and value .
self
value
V
examples
```
use hash_ord::hash_map::{HashMap, Entry};
use std::rc::Rc.

let mut map: HashMap, u32> = HashMap::new();
map.insert(Rc::new("Stringthing".to_string()), 15).

let my_key = Rc::new("Stringthing".to_string()).

if let Entry::Occupied(entry) = map.entry(my_key) {
Also replace the key with a handle to our other key.


` ` ` use hash_ord :: hash_map :: { HashMap Entry } ; use std :: rc :: Rc . let mut map : HashMap u32 > = HashMap :: new () ; map . insert ( Rc :: new ( " Stringthing " . to_string () ) 15 ) . let my_key = Rc :: new ( " Stringthing " . to_string () ) . if let Entry :: Occupied ( entry ) = map . entry ( my_key ) { Also replace the key with a handle to our other key .