Skip to content

Commit 6f56e8a

Browse files
committed
---
yaml --- r: 65026 b: refs/heads/snap-stage3 c: 18e3db7 h: refs/heads/master v: v3
1 parent 067c594 commit 6f56e8a

File tree

6 files changed

+6
-28
lines changed

6 files changed

+6
-28
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b5d77d20ec2db9fbb3ba4b7a670e406bc2dc2206
4+
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/smallintmap.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ impl<V> Mutable for SmallIntMap<V> {
4646
}
4747

4848
impl<V> Map<uint, V> for SmallIntMap<V> {
49-
/// Return true if the map contains a value for the specified key
50-
fn contains_key(&self, key: &uint) -> bool {
51-
self.find(key).is_some()
52-
}
53-
5449
/// Return a reference to the value corresponding to the key
5550
fn find<'a>(&'a self, key: &uint) -> Option<&'a V> {
5651
if *key < self.v.len() {

branches/snap-stage3/src/libextra/treemap.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ impl<K: TotalOrd, V> Mutable for TreeMap<K, V> {
105105
}
106106

107107
impl<K: TotalOrd, V> Map<K, V> for TreeMap<K, V> {
108-
/// Return true if the map contains a value for the specified key
109-
fn contains_key(&self, key: &K) -> bool {
110-
self.find(key).is_some()
111-
}
112-
113108
/// Return a reference to the value corresponding to the key
114109
fn find<'a>(&'a self, key: &K) -> Option<&'a V> {
115110
let mut current: &'a Option<~TreeNode<K, V>> = &self.root;

branches/snap-stage3/src/libstd/container.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ pub trait Mutable: Container {
3434
/// A map is a key-value store where values may be looked up by their keys. This
3535
/// trait provides basic operations to operate on these stores.
3636
pub trait Map<K, V>: Container {
37-
/// Return true if the map contains a value for the specified key
38-
fn contains_key(&self, key: &K) -> bool;
39-
4037
/// Return a reference to the value corresponding to the key
4138
fn find<'a>(&'a self, key: &K) -> Option<&'a V>;
39+
40+
/// Return true if the map contains a value for the specified key
41+
fn contains_key(&self, key: &K) -> bool {
42+
self.find(key).is_some()
43+
}
4244
}
4345

4446
/// This trait provides basic operations to modify the contents of a map.

branches/snap-stage3/src/libstd/hashmap.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,6 @@ impl<K:Hash + Eq,V> Mutable for HashMap<K, V> {
272272
}
273273

274274
impl<K:Hash + Eq,V> Map<K, V> for HashMap<K, V> {
275-
/// Return true if the map contains a value for the specified key
276-
fn contains_key(&self, k: &K) -> bool {
277-
match self.bucket_for_key(k) {
278-
FoundEntry(_) => {true}
279-
TableFull | FoundHole(_) => {false}
280-
}
281-
}
282-
283275
/// Return a reference to the value corresponding to the key
284276
fn find<'a>(&'a self, k: &K) -> Option<&'a V> {
285277
match self.bucket_for_key(k) {

branches/snap-stage3/src/libstd/trie.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ impl<T> Mutable for TrieMap<T> {
4848
}
4949

5050
impl<T> Map<uint, T> for TrieMap<T> {
51-
/// Return true if the map contains a value for the specified key
52-
#[inline]
53-
fn contains_key(&self, key: &uint) -> bool {
54-
self.find(key).is_some()
55-
}
56-
5751
/// Return a reference to the value corresponding to the key
5852
#[inline]
5953
fn find<'a>(&'a self, key: &uint) -> Option<&'a T> {

0 commit comments

Comments
 (0)