librustc: Remove ptr::addr_of
.
This commit is contained in:
parent
58791c2fd8
commit
b0522a497c
61 changed files with 276 additions and 300 deletions
|
@ -151,7 +151,7 @@ pub impl <T:Ord> PriorityQueue<T> {
|
|||
|
||||
priv fn siftup(&mut self, start: uint, mut pos: uint) {
|
||||
unsafe {
|
||||
let new = *addr_of(&self.data[pos]);
|
||||
let new = *ptr::to_unsafe_ptr(&self.data[pos]);
|
||||
|
||||
while pos > start {
|
||||
let parent = (pos - 1) >> 1;
|
||||
|
@ -171,7 +171,7 @@ pub impl <T:Ord> PriorityQueue<T> {
|
|||
priv fn siftdown_range(&mut self, mut pos: uint, end: uint) {
|
||||
unsafe {
|
||||
let start = pos;
|
||||
let new = *addr_of(&self.data[pos]);
|
||||
let new = *ptr::to_unsafe_ptr(&self.data[pos]);
|
||||
|
||||
let mut child = 2 * pos + 1;
|
||||
while child < end {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue