Skip to content

Commit

Permalink
core: implement UncheckedIterator for RepeatN
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Jun 19, 2024
1 parent 387fd1f commit 62f7a4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/iter/sources/repeat_n.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::iter::{FusedIterator, TrustedLen};
use crate::iter::{FusedIterator, TrustedLen, UncheckedIterator};
use crate::mem::ManuallyDrop;
use crate::num::NonZero;

Expand Down Expand Up @@ -193,3 +193,5 @@ impl<A: Clone> FusedIterator for RepeatN<A> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A: Clone> TrustedLen for RepeatN<A> {}
#[unstable(feature = "trusted_len_next_unchecked", issue = "37572")]
impl<A: Clone> UncheckedIterator for RepeatN<A> {}

0 comments on commit 62f7a4e

Please sign in to comment.