File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ Function: new_int_hash
384
384
Construct a hashmap for int keys
385
385
*/
386
386
fn new_int_hash < V : copy > ( ) -> hashmap < int , V > {
387
- fn hash_int ( & & x: int ) -> uint { ret x as uint ; }
387
+ fn hash_int ( & & x: int ) -> uint { int :: hash ( x ) }
388
388
fn eq_int ( & & a: int , & & b: int ) -> bool { ret a == b; }
389
389
ret mk_hashmap( hash_int, eq_int) ;
390
390
}
@@ -395,7 +395,7 @@ Function: new_uint_hash
395
395
Construct a hashmap for uint keys
396
396
*/
397
397
fn new_uint_hash < V : copy > ( ) -> hashmap < uint , V > {
398
- fn hash_uint ( & & x: uint ) -> uint { ret x ; }
398
+ fn hash_uint ( & & x: uint ) -> uint { uint :: hash ( x ) }
399
399
fn eq_uint ( & & a: uint , & & b: uint ) -> bool { ret a == b; }
400
400
ret mk_hashmap( hash_uint, eq_uint) ;
401
401
}
You can’t perform that action at this time.
0 commit comments