about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-08-30 19:01:22 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-08-30 19:05:54 -0700
commit536cb90a216a08870fbaac6aad93f77f0681537d (patch)
tree92020449953adee5178ec5c9f10901577691d779 /src/libstd
parent3462bb6a462253333758b12a8cb1ee72981329cb (diff)
downloadrust-536cb90a216a08870fbaac6aad93f77f0681537d.tar.gz
rust-536cb90a216a08870fbaac6aad93f77f0681537d.zip
Migrate core::send_map to random, keyed hashes w/ hash::Hash trait.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/map.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index d0d36c4e985..2a2e6b5efc6 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -7,6 +7,10 @@ import to_str::ToStr;
 import managed::Managed;
 import send_map::linear::LinearMap;
 
+import core::cmp::Eq;
+import hash::Hash;
+import to_bytes::IterBytes;
+
 export hashmap, hashfn, eqfn, set, map, chained, hashmap, str_hash;
 export box_str_hash;
 export bytes_hash, int_hash, uint_hash, set_add;
@@ -478,7 +482,8 @@ fn hash_from_uints<V: copy>(items: &[(uint, V)]) -> hashmap<uint, V> {
 }
 
 // XXX Transitionary
-impl<K: copy, V: copy> Managed<LinearMap<K, V>>: map<K, V> {
+impl<K: Eq IterBytes Hash copy, V: copy> Managed<LinearMap<K, V>>:
+    map<K, V> {
     pure fn size() -> uint {
         unchecked {
             do self.borrow_const |p| {