diff options
| author | bors <bors@rust-lang.org> | 2014-08-28 23:56:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-28 23:56:20 +0000 |
| commit | 2e92c67dc0318a52fe42c3c0bca408f76c7feb61 (patch) | |
| tree | 1a90b5802f53f36eda0212ac1b02ebd521161f25 /src/libnative | |
| parent | 1a33d7a54170cd2904cebc7a6fd2d1da471ff64e (diff) | |
| parent | 9a8233d3772fbdb3d496aac3e4693e6d4c30e125 (diff) | |
| download | rust-2e92c67dc0318a52fe42c3c0bca408f76c7feb61.tar.gz rust-2e92c67dc0318a52fe42c3c0bca408f76c7feb61.zip | |
auto merge of #16664 : aturon/rust/stabilize-option-result, r=alexcrichton
Per API meeting https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-08-13.md # Changes to `core::option` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. However, a few methods have been deprecated, either due to lack of use or redundancy: * `take_unwrap`, `get_ref` and `get_mut_ref` (redundant, and we prefer for this functionality to go through an explicit .unwrap) * `filtered` and `while` * `mutate` and `mutate_or_set` * `collect`: this functionality is being moved to a new `FromIterator` impl. # Changes to `core::result` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. * `collect`: this functionality is being moved to a new `FromIterator` impl. * `fold_` is deprecated due to lack of use * Several methods found in `core::option` are added here, including `iter`, `as_slice`, and variants. Due to deprecations, this is a: [breaking-change]
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/timer_unix.rs | 2 | ||||
| -rw-r--r-- | src/libnative/lib.rs | 2 | ||||
| -rw-r--r-- | src/libnative/task.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libnative/io/timer_unix.rs b/src/libnative/io/timer_unix.rs index 06d48f2f886..06b78a54e53 100644 --- a/src/libnative/io/timer_unix.rs +++ b/src/libnative/io/timer_unix.rs @@ -119,7 +119,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) { let mut timer = match active.shift() { Some(timer) => timer, None => return }; - let mut cb = timer.cb.take_unwrap(); + let mut cb = timer.cb.take().unwrap(); cb.call(); if timer.repeat { timer.cb = Some(cb); diff --git a/src/libnative/lib.rs b/src/libnative/lib.rs index c7b89b6cb91..06f89d38ca0 100644 --- a/src/libnative/lib.rs +++ b/src/libnative/lib.rs @@ -139,7 +139,7 @@ pub fn start(argc: int, argv: *const *const u8, main: proc()) -> int { unsafe { rt::stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top); } - exit_code = Some(run(main.take_unwrap())); + exit_code = Some(run(main.take().unwrap())); }).destroy()); unsafe { rt::cleanup(); } // If the exit code wasn't set, then the task block must have failed. diff --git a/src/libnative/task.rs b/src/libnative/task.rs index 5c3beeec8ab..ba3f101720f 100644 --- a/src/libnative/task.rs +++ b/src/libnative/task.rs @@ -92,7 +92,7 @@ pub fn spawn_opts(opts: TaskOpts, f: proc():Send) { let mut f = Some(f); let mut task = task; task.put_runtime(ops); - drop(task.run(|| { f.take_unwrap()() }).destroy()); + drop(task.run(|| { f.take().unwrap()() }).destroy()); drop(token); }) } |
