about summary refs log tree commit diff
path: root/src/libstd/map.rs
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2011-12-26 18:59:50 -0800
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2012-01-06 07:47:14 -0800
commiteade7844a339557e57b2ba0503d8edf19ff60f43 (patch)
tree1971c4dc1da4a969cce8bc56f0faa48d4674bd10 /src/libstd/map.rs
parent7806180557d971b1292249f3cad92444c05cd77e (diff)
downloadrust-eade7844a339557e57b2ba0503d8edf19ff60f43.tar.gz
rust-eade7844a339557e57b2ba0503d8edf19ff60f43.zip
libstd: switch map to use libcore's hash functions.
Diffstat (limited to 'src/libstd/map.rs')
-rw-r--r--src/libstd/map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index db47160216c..53e59e210f8 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -384,7 +384,7 @@ Function: new_int_hash
 Construct a hashmap for int keys
 */
 fn new_int_hash<V: copy>() -> hashmap<int, V> {
-    fn hash_int(&&x: int) -> uint { ret x as uint; }
+    fn hash_int(&&x: int) -> uint { int::hash(x) }
     fn eq_int(&&a: int, &&b: int) -> bool { ret a == b; }
     ret mk_hashmap(hash_int, eq_int);
 }
@@ -395,7 +395,7 @@ Function: new_uint_hash
 Construct a hashmap for uint keys
 */
 fn new_uint_hash<V: copy>() -> hashmap<uint, V> {
-    fn hash_uint(&&x: uint) -> uint { ret x; }
+    fn hash_uint(&&x: uint) -> uint { uint::hash(x) }
     fn eq_uint(&&a: uint, &&b: uint) -> bool { ret a == b; }
     ret mk_hashmap(hash_uint, eq_uint);
 }