container: inline contains_key default method

This commit is contained in:
Daniel Micay 2013-08-16 18:13:47 -04:00
parent 0bc1ca4045
commit 2bc999a636

View File

@ -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()
}