about summary refs log tree commit diff
path: root/src/libcore/result.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-03-15 13:57:26 -0700
committerBrian Anderson <banderson@mozilla.com>2012-03-15 13:57:26 -0700
commit844fbd83da4143bae253f3969d7b2cccb258bebc (patch)
tree40c3e330818a990af5e378a2a0eff12d42df076e /src/libcore/result.rs
parent561511e62813840e930ff60e6918ccaea4f00f00 (diff)
downloadrust-844fbd83da4143bae253f3969d7b2cccb258bebc.tar.gz
rust-844fbd83da4143bae253f3969d7b2cccb258bebc.zip
core: Make some functions pure
Diffstat (limited to 'src/libcore/result.rs')
-rw-r--r--src/libcore/result.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 0efd38904a0..09b9b8ccedc 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -15,7 +15,7 @@ Get the value out of a successful result
 
 If the result is an error
 "]
-fn get<T: copy, U>(res: result<T, U>) -> T {
+pure fn get<T: copy, U>(res: result<T, U>) -> T {
     alt res {
       ok(t) { t }
       err(_) {
@@ -33,7 +33,7 @@ Get the value out of an error result
 
 If the result is not an error
 "]
-fn get_err<T, U: copy>(res: result<T, U>) -> U {
+pure fn get_err<T, U: copy>(res: result<T, U>) -> U {
     alt res {
       err(u) { u }
       ok(_) {