diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-31 10:43:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-01 10:31:27 -0700 |
| commit | bba701c59d84eac4e20d0796ec06db8d1cdd39cf (patch) | |
| tree | 3c2109ca567bbc7e7b8d66da7282dac8f8926da6 /src/libcollections/lru_cache.rs | |
| parent | c605c2b57b412402e6b491e91852fd9dbadeb551 (diff) | |
| download | rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.tar.gz rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.zip | |
std: Drop Total from Total{Eq,Ord}
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
Diffstat (limited to 'src/libcollections/lru_cache.rs')
| -rw-r--r-- | src/libcollections/lru_cache.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcollections/lru_cache.rs b/src/libcollections/lru_cache.rs index 7c8513bac32..ea25eee06d0 100644 --- a/src/libcollections/lru_cache.rs +++ b/src/libcollections/lru_cache.rs @@ -73,7 +73,7 @@ impl<K: PartialEq> PartialEq for KeyRef<K> { } } -impl<K: TotalEq> TotalEq for KeyRef<K> {} +impl<K: Eq> Eq for KeyRef<K> {} impl<K, V> LruEntry<K, V> { fn new(k: K, v: V) -> LruEntry<K, V> { @@ -86,7 +86,7 @@ impl<K, V> LruEntry<K, V> { } } -impl<K: Hash + TotalEq, V> LruCache<K, V> { +impl<K: Hash + Eq, V> LruCache<K, V> { /// Create an LRU Cache that holds at most `capacity` items. pub fn new(capacity: uint) -> LruCache<K, V> { let cache = LruCache { @@ -201,7 +201,7 @@ impl<K: Hash + TotalEq, V> LruCache<K, V> { } } -impl<A: fmt::Show + Hash + TotalEq, B: fmt::Show> fmt::Show for LruCache<A, B> { +impl<A: fmt::Show + Hash + Eq, B: fmt::Show> fmt::Show for LruCache<A, B> { /// Return a string that lists the key-value pairs from most-recently /// used to least-recently used. fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -222,14 +222,14 @@ impl<A: fmt::Show + Hash + TotalEq, B: fmt::Show> fmt::Show for LruCache<A, B> { } } -impl<K: Hash + TotalEq, V> Container for LruCache<K, V> { +impl<K: Hash + Eq, V> Container for LruCache<K, V> { /// Return the number of key-value pairs in the cache. fn len(&self) -> uint { self.map.len() } } -impl<K: Hash + TotalEq, V> Mutable for LruCache<K, V> { +impl<K: Hash + Eq, V> Mutable for LruCache<K, V> { /// Clear the cache of all key-value pairs. fn clear(&mut self) { self.map.clear(); |
