Implement TrustedLen for Take<Repeat> and Take<RangeFrom>

This commit is contained in:
oberien
2018-01-18 18:40:08 +01:00
parent 3986539df6
commit a1809d5784
3 changed files with 9 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ impl<A: Clone> DoubleEndedIterator for Repeat<A> {
#[unstable(feature = "fused", issue = "35602")]
impl<A: Clone> FusedIterator for Repeat<A> {}
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A: Clone> TrustedLen for Repeat<A> {}
/// Creates a new iterator that endlessly repeats a single element.
///
/// The `repeat()` function repeats a single value over and over and over and