diff options
| author | Edward Wang <edward.yu.wang@gmail.com> | 2014-02-01 04:35:36 +0800 |
|---|---|---|
| committer | Edward Wang <edward.yu.wang@gmail.com> | 2014-02-11 05:21:35 +0800 |
| commit | e9ff91e9beb6c92d9662242c1090c507b1611c59 (patch) | |
| tree | cb5bfa3501d0613b0375d6a3f7cb299ac2c22d95 /src/libsync/sync | |
| parent | 4f16e519f13cbfd78cd6c06fc0639df401bc0077 (diff) | |
Move replace and swap to std::mem. Get rid of std::util
Also move Void to std::any, move drop to std::mem and reexport in prelude.
Diffstat (limited to 'src/libsync/sync')
| -rw-r--r-- | src/libsync/sync/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsync/sync/mod.rs b/src/libsync/sync/mod.rs index cfff31e08d4..0ac385ea1d1 100644 --- a/src/libsync/sync/mod.rs +++ b/src/libsync/sync/mod.rs @@ -20,10 +20,10 @@ use std::cast; use std::comm; use std::kinds::marker; +use std::mem::replace; use std::sync::arc::UnsafeArc; use std::sync::atomics; use std::unstable::finally::Finally; -use std::util; use arc::MutexArc; @@ -290,7 +290,7 @@ impl<'a> Condvar<'a> { // To avoid :broadcast_heavy, we make a new waitqueue, // swap it out with the old one, and broadcast on the // old one outside of the little-lock. - queue = Some(util::replace(&mut state.blocked[condvar_id], + queue = Some(replace(&mut state.blocked[condvar_id], WaitQueue::new())); } else { out_of_bounds = Some(state.blocked.len()); |
