]> git.lizzy.rs Git - rust.git/commit
dlist: Use a DoubleEndedIterator for .mut_iter() and .mut_rev_iter()
authorblake2-ppc <blake2-ppc>
Fri, 12 Jul 2013 02:23:15 +0000 (04:23 +0200)
committerblake2-ppc <blake2-ppc>
Sat, 13 Jul 2013 02:31:13 +0000 (04:31 +0200)
commitc095a5c6cb5f749613672ab26c492fd55459b125
tree5873ac27749640a6aa9d1541ba16c2765298a64b
parente1d5d1c049608cf182ddc91c98d9700089a35600
dlist: Use a DoubleEndedIterator for .mut_iter() and .mut_rev_iter()

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.
src/libextra/dlist.rs