diff options
| author | Austin King <shout@ozten.com> | 2013-07-16 12:47:01 -0700 |
|---|---|---|
| committer | Austin King <shout@ozten.com> | 2013-07-16 12:47:01 -0700 |
| commit | 712ac836c63c3ae98daf9fb98b7b96ed73347848 (patch) | |
| tree | 2cbf7c02ba61bac838c9dac52c20f376ee0a7996 /src/libstd/task | |
| parent | a317584e4f7643c862e94138eb210ce154974d0e (diff) | |
| download | rust-712ac836c63c3ae98daf9fb98b7b96ed73347848.tar.gz rust-712ac836c63c3ae98daf9fb98b7b96ed73347848.zip | |
Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/spawn.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index 206d19e175f..bf09a533ebe 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -302,7 +302,7 @@ fn each_ancestor(list: &mut AncestorList, fn with_parent_tg<U>(parent_group: &mut Option<TaskGroupArc>, blk: &fn(TaskGroupInner) -> U) -> U { // If this trips, more likely the problem is 'blk' failed inside. - let tmp_arc = parent_group.swap_unwrap(); + let tmp_arc = parent_group.take_unwrap(); let result = do access_group(&tmp_arc) |tg_opt| { blk(tg_opt) }; *parent_group = Some(tmp_arc); result @@ -609,7 +609,7 @@ fn spawn_raw_newsched(mut opts: TaskOpts, f: ~fn()) { }; if opts.notify_chan.is_some() { - let notify_chan = opts.notify_chan.swap_unwrap(); + let notify_chan = opts.notify_chan.take_unwrap(); let notify_chan = Cell::new(notify_chan); let on_exit: ~fn(bool) = |success| { notify_chan.take().send( @@ -647,7 +647,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) { let notify_chan = if opts.notify_chan.is_none() { None } else { - Some(opts.notify_chan.swap_unwrap()) + Some(opts.notify_chan.take_unwrap()) }; let child_wrapper = make_child_wrapper(new_task, child_tg, |
