1
Fork 0

libstd: Fix merge fallout.

This commit is contained in:
Patrick Walton 2013-05-12 17:36:53 -07:00
parent db0693ac8d
commit 58a37a1f48
2 changed files with 14 additions and 10 deletions

View file

@ -128,18 +128,20 @@ pub fn _eachi<A,IA:BaseIter<A>>(this: &IA, blk: &fn(uint, &A) -> bool) -> bool {
}
#[cfg(stage0)]
pub fn eachi<A,IA:BaseIter<A>>(self: &IA, blk: &fn(uint, &A) -> bool) {
_eachi(self, blk);
pub fn eachi<A,IA:BaseIter<A>>(this: &IA, blk: &fn(uint, &A) -> bool) {
_eachi(this, blk);
}
#[cfg(not(stage0))]
pub fn eachi<A,IA:BaseIter<A>>(self: &IA, blk: &fn(uint, &A) -> bool) -> bool {
_eachi(self, blk)
pub fn eachi<A,IA:BaseIter<A>>(this: &IA, blk: &fn(uint, &A) -> bool) -> bool {
_eachi(this, blk)
}
#[inline(always)]
pub fn all<A,IA:BaseIter<A>>(this: &IA, blk: &fn(&A) -> bool) -> bool {
for this.each |a| {
if !blk(a) { return false; }
if !blk(a) {
return false;
}
}
return true;
}
@ -147,7 +149,9 @@ pub fn all<A,IA:BaseIter<A>>(this: &IA, blk: &fn(&A) -> bool) -> bool {
#[inline(always)]
pub fn any<A,IA:BaseIter<A>>(this: &IA, blk: &fn(&A) -> bool) -> bool {
for this.each |a| {
if blk(a) { return true; }
if blk(a) {
return true;
}
}
return false;
}

View file

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