std: Rename result::methods to result::extensions

This commit is contained in:
Erick Tryzelaar 2012-04-01 15:43:48 -07:00
parent 44c7386376
commit 2ad20df40b
2 changed files with 3 additions and 3 deletions
src
libcore
rustc/middle

@ -108,7 +108,7 @@ fn chain_err<T: copy, U: copy, V: copy>(
}
}
impl methods<T:copy,E:copy> for result<T,E> {
impl extensions<T:copy, E:copy> for result<T,E> {
fn chain<U:copy>(op: fn(T) -> result<U,E>) -> result<U,E> {
chain(self, op)
}

@ -5,7 +5,7 @@ import middle::ty;
import syntax::ast;
import syntax::ast::{ret_style};
import util::ppaux::{ty_to_str, mt_to_str};
import result::{result, methods, chain, chain_err, ok, err, map, map2, iter2};
import result::{result, extensions, ok, err, map, map2, iter2};
import ty::type_is_bot;
export infer_ctxt;
@ -85,7 +85,7 @@ fn fixup_vars(cx: infer_ctxt, a: ty::t) -> fres<ty::t> {
impl methods for ures {
fn then<T:copy>(f: fn() -> result<T,ty::type_err>)
-> result<T,ty::type_err> {
chain(self) {|_i| f() }
self.chain() {|_i| f() }
}
}