Skip to content

Commit 0d92c53

Browse files
committed
Reordered the methods in std::Option and std::Result
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
1 parent 04c58c9 commit 0d92c53

File tree

8 files changed

+415
-386
lines changed

8 files changed

+415
-386
lines changed

src/librustc/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4560,14 +4560,14 @@ pub fn count_traits_and_supertraits(tcx: ctxt,
45604560
}
45614561

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

45694569
pub fn get_opaque_ty(tcx: ctxt) -> Result<t, ~str> {
4570-
do tcx.lang_items.require(OpaqueStructLangItem).map_move |opaque_lang_item| {
4570+
do tcx.lang_items.require(OpaqueStructLangItem).map |opaque_lang_item| {
45714571
tcx.intrinsic_defs.find_copy(&opaque_lang_item)
45724572
.expect("Failed to resolve Opaque")
45734573
}

src/librustuv/uvio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ fn test_timer_sleep_simple() {
24642464
unsafe {
24652465
let io = local_io();
24662466
let timer = io.timer_init();
2467-
do timer.map_move |mut t| { t.sleep(1) };
2467+
do timer.map |mut t| { t.sleep(1) };
24682468
}
24692469
}
24702470
}

0 commit comments

Comments
 (0)