Skip to content

Commit

Permalink
[Lib] u8.rs, u64.rs: +min_value, max_value
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoric authored and brson committed Oct 17, 2011
1 parent 007422c commit 27ca86a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/lib/u64.rs
@@ -1,3 +1,6 @@
pure fn max_value() -> u64 { ret 18446744073709551615u64; }
pure fn min_value() -> u64 { ret 0u64; }

fn to_str(n: u64, radix: uint) -> str {
assert (0u < radix && radix <= 16u);

Expand Down
3 changes: 2 additions & 1 deletion src/lib/u8.rs
@@ -1,4 +1,5 @@

pure fn max_value() -> u8 { ret 255u8; }
pure fn min_value() -> u8 { ret 0u8; }

pure fn add(x: u8, y: u8) -> u8 { ret x + y; }

Expand Down

0 comments on commit 27ca86a

Please sign in to comment.