Skip to content

Commit

Permalink
Added DoubleEndedIterator for MutFlowListIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
avadacatavra committed Jun 17, 2016
1 parent 0c9d0eb commit 5c79432
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/layout/flow_list.rs
Expand Up @@ -117,6 +117,12 @@ impl<'a> DoubleEndedIterator for FlowListIterator<'a> {
}
}

impl<'a> DoubleEndedIterator for MutFlowListIterator<'a> {
fn next_back(&mut self) -> Option<&'a mut Flow> {
self.it.next_back().map(flow_ref::deref_mut)
}
}

impl<'a> Iterator for MutFlowListIterator<'a> {
type Item = &'a mut Flow;
#[inline]
Expand Down

0 comments on commit 5c79432

Please sign in to comment.