1
Fork 0

std: Use the new for protocol

This commit is contained in:
Alex Crichton 2013-05-02 18:33:27 -04:00
parent 28256052a4
commit 3ce9dba677
9 changed files with 433 additions and 51 deletions

View file

@ -28,7 +28,14 @@ impl<T:Ord> BaseIter<T> for PriorityQueue<T> {
/// Visit all values in the underlying vector.
///
/// The values are **not** visited in order.
#[cfg(stage0)]
fn each(&self, f: &fn(&T) -> bool) { self.data.each(f) }
/// Visit all values in the underlying vector.
///
/// The values are **not** visited in order.
#[cfg(not(stage0))]
fn each(&self, f: &fn(&T) -> bool) -> bool { self.data.each(f) }
fn size_hint(&self) -> Option<uint> { self.data.size_hint() }
}