1
Fork 0

Register snapshots

This commit is contained in:
Brian Anderson 2012-12-17 16:04:04 -08:00
parent f1e87733bd
commit d6d12d90ff
9 changed files with 8 additions and 55 deletions

View file

@ -80,20 +80,10 @@ impl <T: Ord> PriorityQueue<T> {
}
/// Consume the PriorityQueue and return the underlying vector
#[cfg(stage0)]
pure fn to_vec(self) -> ~[T] { fail }
#[cfg(stage1)]
#[cfg(stage2)]
#[cfg(stage3)]
pure fn to_vec(self) -> ~[T] { let PriorityQueue{data: v} = self; v }
/// Consume the PriorityQueue and return a vector in sorted
/// (ascending) order
#[cfg(stage0)]
pure fn to_sorted_vec(self) -> ~[T] { fail }
#[cfg(stage1)]
#[cfg(stage2)]
#[cfg(stage3)]
pure fn to_sorted_vec(self) -> ~[T] {
let mut q = self;
let mut end = q.len();