Skip to content

Commit 2bc999a

Browse files
committed
container: inline contains_key default method
1 parent 0bc1ca4 commit 2bc999a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libstd/container.rs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub trait Map<K, V>: Container {
3838
fn find<'a>(&'a self, key: &K) -> Option<&'a V>;
3939

4040
/// Return true if the map contains a value for the specified key
41+
#[inline]
4142
fn contains_key(&self, key: &K) -> bool {
4243
self.find(key).is_some()
4344
}

0 commit comments

Comments
 (0)