Skip to content

Commit

Permalink
Auto merge of #143 - koute:master, r=mbrubeck
Browse files Browse the repository at this point in the history
Implement `FusedIterator` for `Drain` and `IntoIter`

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/143)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo authored Mar 3, 2019
2 parents dfd78d1 + 58b8dc8 commit e71c899
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use std::borrow::{Borrow, BorrowMut};
use std::cmp;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::iter::{IntoIterator, FromIterator, repeat};
use std::iter::{IntoIterator, FromIterator, FusedIterator, repeat};
use std::mem;
use std::mem::ManuallyDrop;
use std::ops;
Expand Down Expand Up @@ -266,6 +266,7 @@ impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> {
}

impl<'a, T> ExactSizeIterator for Drain<'a, T> { }
impl<'a, T> FusedIterator for Drain<'a, T> { }

impl<'a, T: 'a> Drop for Drain<'a,T> {
fn drop(&mut self) {
Expand Down Expand Up @@ -1506,6 +1507,7 @@ impl<A: Array> DoubleEndedIterator for IntoIter<A> {
}

impl<A: Array> ExactSizeIterator for IntoIter<A> { }
impl<A: Array> FusedIterator for IntoIter<A> { }

impl<A: Array> IntoIterator for SmallVec<A> {
type IntoIter = IntoIter<A>;
Expand Down

0 comments on commit e71c899

Please sign in to comment.