From 9e4c2b6bc60335f3eb64d4ea0514bafabd264675 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Thu, 27 Oct 2011 12:18:51 -0700 Subject: [PATCH] Mark uint add/sub/mul/div/rem functions as pure --- src/lib/uint.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/uint.rs b/src/lib/uint.rs index 7c93ee7fc72c..179ba96f16ce 100644 --- a/src/lib/uint.rs +++ b/src/lib/uint.rs @@ -14,15 +14,15 @@ pure fn max_value() -> uint { ret 0u - 1u; } -fn add(x: uint, y: uint) -> uint { ret x + y; } +pure fn add(x: uint, y: uint) -> uint { ret x + y; } -fn sub(x: uint, y: uint) -> uint { ret x - y; } +pure fn sub(x: uint, y: uint) -> uint { ret x - y; } -fn mul(x: uint, y: uint) -> uint { ret x * y; } +pure fn mul(x: uint, y: uint) -> uint { ret x * y; } -fn div(x: uint, y: uint) -> uint { ret x / y; } +pure fn div(x: uint, y: uint) -> uint { ret x / y; } -fn rem(x: uint, y: uint) -> uint { ret x % y; } +pure fn rem(x: uint, y: uint) -> uint { ret x % y; } pure fn lt(x: uint, y: uint) -> bool { ret x < y; }