From 3ce9dba6775c7e1dbfb510626c073a8f926b6880 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 2 May 2013 18:33:27 -0400 Subject: std: Use the new `for` protocol --- src/libstd/priority_queue.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstd/priority_queue.rs') diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs index b2f8c9c3c4e..bdb93142472 100644 --- a/src/libstd/priority_queue.rs +++ b/src/libstd/priority_queue.rs @@ -28,7 +28,14 @@ impl BaseIter for PriorityQueue { /// 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 { self.data.size_hint() } } -- cgit 1.4.1-3-g733a5