diff --git a/src/libcore/result.rs b/src/libcore/result.rs index cb34213d974..64385fca9bf 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -109,6 +109,14 @@ fn chain_err( } impl extensions for result { + fn get() -> T { get(self) } + + fn get_err() -> E { get_err(self) } + + fn success() -> bool { success(self) } + + fn failure() -> bool { failure(self) } + fn chain(op: fn(T) -> result) -> result { chain(self, op) }