libcore: add a trivial uint hash function.
This commit is contained in:
parent
ae225e2b6c
commit
7806180557
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue