1
Fork 0

libcore: add a trivial uint hash function.

This commit is contained in:
Erick Tryzelaar 2011-12-26 18:58:40 -08:00
parent ae225e2b6c
commit 7806180557

View file

@ -103,6 +103,13 @@ pure fn ge(x: uint, y: uint) -> bool { ret x >= y; }
/* Predicate: gt */
pure fn gt(x: uint, y: uint) -> bool { ret x > y; }
/*
Function: hash
Produce a uint suitable for use in a hash table
*/
fn hash(x: uint) -> uint { ret x; }
/*
Function: range