core: Make uint::min/max pure
This commit is contained in:
parent
910c6a5df8
commit
3bdb627b5d
@ -25,14 +25,14 @@ const max_value: uint = 0u - 1u;
|
||||
/*
|
||||
Function: max
|
||||
*/
|
||||
fn max(x: uint, y: uint) -> uint {
|
||||
pure fn max(x: uint, y: uint) -> uint {
|
||||
if x > y { x } else { y }
|
||||
}
|
||||
|
||||
/*
|
||||
Function: min
|
||||
*/
|
||||
fn min(x: uint, y: uint) -> uint {
|
||||
pure fn min(x: uint, y: uint) -> uint {
|
||||
if x < y { x } else { y }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user