Skip to content

Commit

Permalink
Reordered the methods in std::Option and std::Result
Browse files Browse the repository at this point in the history
Cleaned up the source in a few places

Renamed `map_move` to `map`, removed other `map` methods

Added `as_ref` and `as_mut` adapters to `Result`

Added `fmt::Default` impl
  • Loading branch information
Kimundi committed Nov 1, 2013
1 parent 04c58c9 commit 0d92c53
Show file tree
Hide file tree
Showing 8 changed files with 415 additions and 386 deletions.
4 changes: 2 additions & 2 deletions src/librustc/middle/ty.rs
Expand Up @@ -4560,14 +4560,14 @@ pub fn count_traits_and_supertraits(tcx: ctxt,
}

pub fn get_tydesc_ty(tcx: ctxt) -> Result<t, ~str> {
do tcx.lang_items.require(TyDescStructLangItem).map_move |tydesc_lang_item| {
do tcx.lang_items.require(TyDescStructLangItem).map |tydesc_lang_item| {
tcx.intrinsic_defs.find_copy(&tydesc_lang_item)
.expect("Failed to resolve TyDesc")
}
}

pub fn get_opaque_ty(tcx: ctxt) -> Result<t, ~str> {
do tcx.lang_items.require(OpaqueStructLangItem).map_move |opaque_lang_item| {
do tcx.lang_items.require(OpaqueStructLangItem).map |opaque_lang_item| {
tcx.intrinsic_defs.find_copy(&opaque_lang_item)
.expect("Failed to resolve Opaque")
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustuv/uvio.rs
Expand Up @@ -2464,7 +2464,7 @@ fn test_timer_sleep_simple() {
unsafe {
let io = local_io();
let timer = io.timer_init();
do timer.map_move |mut t| { t.sleep(1) };
do timer.map |mut t| { t.sleep(1) };
}
}
}
Expand Down

0 comments on commit 0d92c53

Please sign in to comment.