diff --git a/src/servo/gfx/geometry.rs b/src/servo/gfx/geometry.rs index dd6c5b2e69d..a88c31d8e1d 100644 --- a/src/servo/gfx/geometry.rs +++ b/src/servo/gfx/geometry.rs @@ -6,15 +6,15 @@ import num::num; enum au = int; impl au of num for au { - fn add(&&other: au) -> au { au(*self + *other) } - fn sub(&&other: au) -> au { au(*self - *other) } - fn mul(&&other: au) -> au { au(*self * *other) } - fn div(&&other: au) -> au { au(*self / *other) } - fn modulo(&&other: au) -> au { au(*self % *other) } - fn neg() -> au { au(-*self) } + pure fn add(&&other: au) -> au { au(*self + *other) } + pure fn sub(&&other: au) -> au { au(*self - *other) } + pure fn mul(&&other: au) -> au { au(*self * *other) } + pure fn div(&&other: au) -> au { au(*self / *other) } + pure fn modulo(&&other: au) -> au { au(*self % *other) } + pure fn neg() -> au { au(-*self) } - fn to_int() -> int { *self } - fn from_int(n: int) -> au { au(n) } + pure fn to_int() -> int { *self } + pure fn from_int(n: int) -> au { au(n) } } fn box(x: A, y: A, w: A, h: A) -> Rect { diff --git a/src/servo/util/color.rs b/src/servo/util/color.rs index 0b2af220b03..738de6f672c 100644 --- a/src/servo/util/color.rs +++ b/src/servo/util/color.rs @@ -12,7 +12,7 @@ import cmp::eq; enum Color = {red : u8, green : u8, blue : u8, alpha : float}; impl Color of eq for Color { - fn eq(&&other: Color) -> bool { + pure fn eq(&&other: Color) -> bool { ret self.red == other.red && self.green == other.green && self.blue == other.blue && self.alpha == other.alpha; }