/// Removes the given key from the cache and returns its corresponding value.
///
/// # Examples
///
/// ```
/// use lru_size_cache::LruSizeCache;
///
/// let mut cache = LruSizeCache::new(2);
///
/// cache.insert(2, "a");
///
/// assert_eq!(cache.remove(&1), None);
/// assert_eq!(cache.remove(&2), Some("a"));
/// assert_eq!(cache.remove(&2), None);
/// assert_eq!(cache.len(), 0);
/// ```
Removes the given key from the cache and returns its corresponding value.
Removes the given key from the cache and returns its corresponding value .
pub fn remove<Q: ?Sized>(&mut self, k: &Q) -> Option<V>
        where K: Borrow<Q>,
              Q: Hash + Eq
    {
        let removed = self.map.remove(k);
        if let Some(ref removed_val) = removed {
            self.used -= removed_val.size();
        }
        removed
    }
pub fn remove < Q : ? Sized > ( & mut self , k : & Q ) -> Option < V > where K : Borrow < Q > , Q : Hash + Eq { let removed = self . map . remove ( k ) ; if let Some ( ref removed_val ) = removed { self . used -= removed_val . size ( ) ; } removed }
Removes the given key from the cache and returns its corresponding value.
Removes the given key from the cache and returns its corresponding value .
&mut self
k
&Q
examples
```
use lru_size_cache::LruSizeCache.

let mut cache = LruSizeCache::new(2).




` ` ` use lru_size_cache :: LruSizeCache . let mut cache = LruSizeCache :: new ( 2 ) .