Skip to content

Commit

Permalink
Implement FusedIterator for GenericArrayIter
Browse files Browse the repository at this point in the history
  • Loading branch information
novacrazy committed Apr 14, 2019
1 parent 450f7da commit 631d344
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/iter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! `GenericArray` iterator implementation.
use super::{ArrayLength, GenericArray};
use core::iter::FusedIterator;
use core::mem::ManuallyDrop;
use core::{cmp, fmt, mem, ptr};

Expand Down Expand Up @@ -243,4 +244,10 @@ where
}
}

// TODO: Implement `FusedIterator` and `TrustedLen` when stabilized
impl<T, N> FusedIterator for GenericArrayIter<T, N>
where
N: ArrayLength<T>,
{
}

// TODO: Implement `TrustedLen` when stabilized

0 comments on commit 631d344

Please sign in to comment.