Skip to content

Commit 9e4c2b6

Browse files
mbrubeckbrson
authored andcommitted
Mark uint add/sub/mul/div/rem functions as pure
1 parent 8dba51b commit 9e4c2b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/uint.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ pure fn max_value() -> uint {
1414
ret 0u - 1u;
1515
}
1616

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

19-
fn sub(x: uint, y: uint) -> uint { ret x - y; }
19+
pure fn sub(x: uint, y: uint) -> uint { ret x - y; }
2020

21-
fn mul(x: uint, y: uint) -> uint { ret x * y; }
21+
pure fn mul(x: uint, y: uint) -> uint { ret x * y; }
2222

23-
fn div(x: uint, y: uint) -> uint { ret x / y; }
23+
pure fn div(x: uint, y: uint) -> uint { ret x / y; }
2424

25-
fn rem(x: uint, y: uint) -> uint { ret x % y; }
25+
pure fn rem(x: uint, y: uint) -> uint { ret x % y; }
2626

2727
pure fn lt(x: uint, y: uint) -> bool { ret x < y; }
2828

0 commit comments

Comments
 (0)