From 58a37a1f485a738f6802b42dd39437618b18bbae Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sun, 12 May 2013 17:36:53 -0700 Subject: [PATCH] libstd: Fix merge fallout. --- src/libcore/old_iter.rs | 16 ++++++++++------ src/libstd/priority_queue.rs | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/libcore/old_iter.rs b/src/libcore/old_iter.rs index 95bc8872c91c..13d8fd266549 100644 --- a/src/libcore/old_iter.rs +++ b/src/libcore/old_iter.rs @@ -128,18 +128,20 @@ pub fn _eachi>(this: &IA, blk: &fn(uint, &A) -> bool) -> bool { } #[cfg(stage0)] -pub fn eachi>(self: &IA, blk: &fn(uint, &A) -> bool) { - _eachi(self, blk); +pub fn eachi>(this: &IA, blk: &fn(uint, &A) -> bool) { + _eachi(this, blk); } #[cfg(not(stage0))] -pub fn eachi>(self: &IA, blk: &fn(uint, &A) -> bool) -> bool { - _eachi(self, blk) +pub fn eachi>(this: &IA, blk: &fn(uint, &A) -> bool) -> bool { + _eachi(this, blk) } #[inline(always)] pub fn all>(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>(this: &IA, blk: &fn(&A) -> bool) -> bool { #[inline(always)] pub fn any>(this: &IA, blk: &fn(&A) -> bool) -> bool { for this.each |a| { - if blk(a) { return true; } + if blk(a) { + return true; + } } return false; } diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs index 5b3f3e6efa74..c5ab1a7719cd 100644 --- a/src/libstd/priority_queue.rs +++ b/src/libstd/priority_queue.rs @@ -153,7 +153,7 @@ pub impl PriorityQueue { 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 PriorityQueue { 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 PriorityQueue { 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 PriorityQueue { 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;