Skip to content

Commit

Permalink
Auto merge of #11778 - avadacatavra:mutflowlistdoubleiter, r=Ms2ger
Browse files Browse the repository at this point in the history
Added DoubleEndedIterator for MutFlowListIterator

<!-- Please describe your changes on the following line: -->
Added DoubleEndedIterator for MutFlowListIterator
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X ] `./mach build -d` does not report any errors
- [X ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11778)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Jun 17, 2016
2 parents f029e1a + 5c79432 commit 324548f
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 324548f

Please sign in to comment.