diff options
| author | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-02-15 02:30:30 -0500 |
|---|---|---|
| committer | Luqman Aden <laden@mozilla.com> | 2013-02-15 02:49:54 -0800 |
| commit | 4cf51c2531bf754d5eaddaf7c5798b983d399751 (patch) | |
| tree | 173c719a03882b7a83a0beb6005cbc2126efce9e /src/libstd/priority_queue.rs | |
| parent | 9727008ed0772fc325e0822e74b429e4e7c09af0 (diff) | |
| download | rust-4cf51c2531bf754d5eaddaf7c5798b983d399751.tar.gz rust-4cf51c2531bf754d5eaddaf7c5798b983d399751.zip | |
libstd: Get rid of `move`.
Diffstat (limited to 'src/libstd/priority_queue.rs')
| -rw-r--r-- | src/libstd/priority_queue.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs index a25a4196b4c..b216834a205 100644 --- a/src/libstd/priority_queue.rs +++ b/src/libstd/priority_queue.rs @@ -139,27 +139,27 @@ impl <T: Ord> PriorityQueue<T> { priv fn siftup(&mut self, start: uint, mut pos: uint) { unsafe { - let new = move *addr_of(&self.data[pos]); + let new = *addr_of(&self.data[pos]); while pos > start { let parent = (pos - 1) >> 1; if new > self.data[parent] { let mut x = rusti::init(); x <-> self.data[parent]; - rusti::move_val_init(&mut self.data[pos], move x); + rusti::move_val_init(&mut self.data[pos], x); pos = parent; loop } break } - rusti::move_val_init(&mut self.data[pos], move new); + rusti::move_val_init(&mut self.data[pos], new); } } priv fn siftdown_range(&mut self, mut pos: uint, end: uint) { unsafe { let start = pos; - let new = move *addr_of(&self.data[pos]); + let new = *addr_of(&self.data[pos]); let mut child = 2 * pos + 1; while child < end { @@ -169,12 +169,12 @@ impl <T: Ord> PriorityQueue<T> { } let mut x = rusti::init(); x <-> self.data[child]; - rusti::move_val_init(&mut self.data[pos], move x); + rusti::move_val_init(&mut self.data[pos], x); pos = child; child = 2 * pos + 1; } - rusti::move_val_init(&mut self.data[pos], move new); + rusti::move_val_init(&mut self.data[pos], new); self.siftup(start, pos); } } |
