1
Fork 0

Replace init() with uninit() where appropriate

This commit is contained in:
James Miller 2013-05-09 22:41:26 +12:00
parent 050c744c23
commit f5ab112e6b
4 changed files with 9 additions and 14 deletions

View file

@ -139,7 +139,7 @@ pub impl <T:Ord> PriorityQueue<T> {
while pos > start {
let parent = (pos - 1) >> 1;
if new > self.data[parent] {
let mut x = rusti::init();
let mut x = rusti::uninit();
x <-> self.data[parent];
rusti::move_val_init(&mut self.data[pos], x);
pos = parent;
@ -162,7 +162,7 @@ pub impl <T:Ord> PriorityQueue<T> {
if right < end && !(self.data[child] > self.data[right]) {
child = right;
}
let mut x = rusti::init();
let mut x = rusti::uninit();
x <-> self.data[child];
rusti::move_val_init(&mut self.data[pos], x);
pos = child;