container: inline contains_key default method
This commit is contained in:
parent
0bc1ca4045
commit
2bc999a636
@ -38,6 +38,7 @@ pub trait Map<K, V>: Container {
|
||||
fn find<'a>(&'a self, key: &K) -> Option<&'a V>;
|
||||
|
||||
/// Return true if the map contains a value for the specified key
|
||||
#[inline]
|
||||
fn contains_key(&self, key: &K) -> bool {
|
||||
self.find(key).is_some()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user