summary refs log tree commit diff
path: root/src/libextra/priority_queue.rs
AgeCommit message (Collapse)AuthorLines
2013-06-30Convert vec::{reverse, swap} to methods.Huon Wilson-1/+1
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-4/+3
2013-06-28Convert vec::{reserve, reserve_at_least, capacity} to methods.Huon Wilson-3/+3
2013-06-26priority_queue: implement simple iteratorRamkumar Ramachandra-4/+27
Remove PriorityQueue::each and replace it with PriorityQueue::iter, which ultimately calls into vec::VecIterator via PriorityQueueIterator. Implement iterator::Iterator for PriorityQueueIterator. Now you should be able to do: extern mod extra; let mut pq = extra::priority_queue::PriorityQueue::new(); pq.push(5); pq.push(6); pq.push(3); for pq.iter().advance |el| { println(fmt!("%d", *el)); } just like you iterate over vectors, hashmaps, hashsets etc. Note that the iteration order is arbitrary (as before with PriorityQueue::each), and _not_ the order you get when you pop() repeatedly. Add an in-file test to guard this. Reported-by: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-24remove old_iterDaniel Micay-11/+6
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and written in an ancient dialect of Rust so I've just removed it this also removes `to_vec` from DList because it's provided by `std::iter::to_vec` an Iterator implementation is added for OptVec but some transitional internal iterator methods are still left
2013-06-23vec: remove BaseIter implementationDaniel Micay-2/+2
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-15rm vec::uniq_lenDaniel Micay-2/+2
2013-06-09cmp: remove duplicate free functionsDaniel Micay-5/+5
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-19/+20
2013-05-30libextra: Require documentation by defaultAlex Crichton-0/+1
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+1
2013-05-23cleanup warnings from libextraErick Tryzelaar-1/+0
2013-05-22test: Update tests and import the prelude in some more places.Patrick Walton-12/+12
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+320
This only changes the directory names; it does not change the "real" metadata names.