Skip to content

Commit 7244463

Browse files
committed
std: Flesh out result::extensions.
1 parent 2ad20df commit 7244463

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/libcore/result.rs

+8
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ fn chain_err<T: copy, U: copy, V: copy>(
109109
}
110110

111111
impl extensions<T:copy, E:copy> for result<T,E> {
112+
fn get() -> T { get(self) }
113+
114+
fn get_err() -> E { get_err(self) }
115+
116+
fn success() -> bool { success(self) }
117+
118+
fn failure() -> bool { failure(self) }
119+
112120
fn chain<U:copy>(op: fn(T) -> result<U,E>) -> result<U,E> {
113121
chain(self, op)
114122
}

0 commit comments

Comments
 (0)