about summary refs log tree commit diff
path: root/src/libextra/dlist.rs
AgeCommit message (Collapse)AuthorLines
2013-07-21dlist: Add .rotate_to_front(), .rotate_to_back()blake2-ppc-0/+43
Add methods to move back element to front or front element to back, without reallocating nodes.
2013-07-21dlist: Factor out pop and push operations by list nodeblake2-ppc-54/+104
Factor out internal methods for pop/push ~Node<T>, This allows moving nodes instead of destructuring and allocating new. Make use of this in .merge() so that it requires no allocations when merging two DList.
2013-07-21dlist: Simplify match clauses to use Option methodsblake2-ppc-65/+33
Make the core Deque implementation a bit simpler by using Option methods when we simply map on a Some value, and deduplicate some common lines.
2013-07-20dlist: Implement Clone for immutable iteratorsblake2-ppc-0/+23
2013-07-20Use Option .take() or .take_unwrap() instead of util::replace where possibleblake2-ppc-1/+1
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-2/+2
2013-07-16Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764Austin King-3/+3
2013-07-14dlist: Use inline on very small functions and iterator functionsblake2-ppc-2/+25
2013-07-14dlist: Simplify by using Option::{map, map_mut}blake2-ppc-13/+4
These methods were fixed or just added so they can now be used.
2013-07-13dlist: Use a DoubleEndedIterator for .mut_iter() and .mut_rev_iter()blake2-ppc-79/+109
Unify the mutable iterators too. Switch the ListInsertion trait to use method .insert_next() and .peek_next() for list mutation. .insert_next() inserts an element into the list that will not appear in iteration, of course; so the length of the iteration can not change during iteration.
2013-07-13dlist: Use DoubleEndedIterator for .consume_rev_iter()blake2-ppc-12/+4
2013-07-13dlist: Implement DoubleEndedIterator and use for .iter() and .rev_iter()blake2-ppc-39/+33
2013-07-13dlist: Fix bug in DList::mergeblake2-ppc-11/+18
Did not properly allow runs from the `other` list to be merged in. The test case was using a wrong expected value. Edited docs for merge so they explain more clearly what it does. Also make sure insert_ordered is marked pub.
2013-07-11extra: Mention extra::container::Deque trait in doc for RingBuf and DListblake2-ppc-1/+4
2013-07-11dlist: Name the type DList for doubly-linked listblake2-ppc-67/+67
2013-07-11dlist: Fix license headerblake2-ppc-0/+9
2013-07-11dlist: Implement trait Dequeblake2-ppc-22/+25
2013-07-11dlist: Expose ListInsertion trait with insert_before and peek_nextblake2-ppc-12/+35
An iterator that allows mutating the list is very useful but needs care to not be unsound. ListIteration exposes only insert_before (used for insert_ordered) and peek_next so far.
2013-07-11dlist: Put all tests into a tests moduleblake2-ppc-258/+256
The exception is the function check_links which needs access to struct Node (which is not pub).
2013-07-11dlist: Collect a common pattern into link_with_prev()blake2-ppc-17/+15
2013-07-11dlist: Introduce a struct Rawlink mimicing Option<T> for a raw pointerblake2-ppc-62/+73
Rawlink<T> holds a *mut T pointer and can convert itself to Option<&mut T>. The null pointer is of course None.
2013-07-11dlist: Implement size_hint properly for all iteratorsblake2-ppc-8/+23
2013-07-11dlist: A new implementation of an owned doubly-linked listblake2-ppc-898/+834
This is an owned sendable linked list which allows insertion and deletion at both ends, with fast traversal through iteration, and fast append/prepend. It is indended to replace the previous managed DList with exposed list nodes. It does not match it feature by feature, but DList could grow more methods if needed.
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-3/+1
2013-06-28extra: silence some test warnings.Huon Wilson-2/+0
2013-06-24remove old_iterDaniel Micay-58/+36
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-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-2/+2
2013-06-16Add copies to type params with Copy boundNiko Matsakis-8/+9
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-09std: remove fold[lr] in favour of iteratorsHuon Wilson-1/+2
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-53/+51
2013-05-30libextra: Require documentation by defaultAlex Crichton-0/+3
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+5
2013-05-23cleanup warnings from libextraErick Tryzelaar-21/+21
2013-05-22test: Update tests and import the prelude in some more places.Patrick Walton-0/+2
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/+981
This only changes the directory names; it does not change the "real" metadata names.