collectivity 3.2.2

Generic collection traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::Remove as RemoveWithSafety;

/// `Remove` without safety information
pub trait Remove<K, V> {
  /// `remove` without safety information
  fn remove(&mut self, k: K) -> Option<V>;
}

impl<K, V, R: RemoveWithSafety<K, V>> Remove<K, V> for R {
  fn remove(&mut self, k: K) -> Option<V> {
    R::remove(self, k)
  }
}