about summary refs log tree commit diff
path: root/src/libstd/oldmap.rs
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-02-08 17:08:02 -0500
committerDaniel Micay <danielmicay@gmail.com>2013-02-08 19:12:51 -0500
commita32c5c73ee6aad9cb4b2e06867eafa09bc1ece3a (patch)
tree2aad1f0f2746fa829df4e00d54f7fae68fa38bd0 /src/libstd/oldmap.rs
parentf529af0d5020a1d635a18304f138c9247fd10ec5 (diff)
downloadrust-a32c5c73ee6aad9cb4b2e06867eafa09bc1ece3a.tar.gz
rust-a32c5c73ee6aad9cb4b2e06867eafa09bc1ece3a.zip
oldmap: get rid of legacy _ref suffixes
Diffstat (limited to 'src/libstd/oldmap.rs')
-rw-r--r--src/libstd/oldmap.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libstd/oldmap.rs b/src/libstd/oldmap.rs
index ad7e8e50e38..fb594af4942 100644
--- a/src/libstd/oldmap.rs
+++ b/src/libstd/oldmap.rs
@@ -173,7 +173,7 @@ pub mod chained {
     }
 
     impl<K:Eq IterBytes Hash Copy, V: Copy> T<K, V> {
-        pure fn contains_key_ref(&self, k: &K) -> bool {
+        pure fn contains_key(&self, k: &K) -> bool {
             let hash = k.hash_keyed(0,0) as uint;
             match self.search_tbl(k, hash) {
               NotFound => false,
@@ -314,18 +314,18 @@ pub mod chained {
             }
         }
 
-        pure fn each_ref(&self, blk: fn(key: &K, value: &V) -> bool) {
+        pure fn each(&self, blk: fn(key: &K, value: &V) -> bool) {
             for self.each_entry |entry| {
                 if !blk(&entry.key, &entry.value) { break; }
             }
         }
 
-        pure fn each_key_ref(&self, blk: fn(key: &K) -> bool) {
-            self.each_ref(|k, _v| blk(k))
+        pure fn each_key(&self, blk: fn(key: &K) -> bool) {
+            self.each(|k, _v| blk(k))
         }
 
-        pure fn each_value_ref(&self, blk: fn(value: &V) -> bool) {
-            self.each_ref(|_k, v| blk(v))
+        pure fn each_value(&self, blk: fn(value: &V) -> bool) {
+            self.each(|_k, v| blk(v))
         }
     }
 
@@ -397,7 +397,7 @@ pub fn set_add<K:Eq IterBytes Hash Const Copy>(set: Set<K>, key: K) -> bool {
 /// Convert a set into a vector.
 pub pure fn vec_from_set<T:Eq IterBytes Hash Copy>(s: Set<T>) -> ~[T] {
     do vec::build_sized(s.len()) |push| {
-        for s.each_key_ref() |&k| {
+        for s.each_key() |&k| {
             push(k);
         }
     }
@@ -628,9 +628,9 @@ mod tests {
     fn test_contains_key() {
         let key = ~"k";
         let map = HashMap::<~str, ~str>();
-        assert (!map.contains_key_ref(&key));
+        assert (!map.contains_key(&key));
         map.insert(key, ~"val");
-        assert (map.contains_key_ref(&key));
+        assert (map.contains_key(&key));
     }
 
     #[test]
@@ -648,10 +648,10 @@ mod tests {
         let mut map = HashMap::<~str, ~str>();
         map.insert(key, ~"val");
         assert (map.len() == 1);
-        assert (map.contains_key_ref(&key));
+        assert (map.contains_key(&key));
         map.clear();
         assert (map.len() == 0);
-        assert (!map.contains_key_ref(&key));
+        assert (!map.contains_key(&key));
     }
 
     #[test]