mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
libstd: switch map to use libcore's hash functions.
This commit is contained in:
+2
-2
@@ -384,7 +384,7 @@ fn new_str_hash<V: copy>() -> hashmap<str, V> {
|
||||
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 @@ fn new_int_hash<V: copy>() -> hashmap<int, V> {
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user