mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
fill-in tracking issue for feature(iter_array_chunks)
This commit is contained in:
parent
eb6b729545
commit
5fbcde1b55
@ -11,7 +11,7 @@ use crate::ops::{ControlFlow, NeverShortCircuit, Try};
|
||||
/// method on [`Iterator`]. See its documentation for more.
|
||||
#[derive(Debug, Clone)]
|
||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
pub struct ArrayChunks<I: Iterator, const N: usize> {
|
||||
iter: I,
|
||||
remainder: Option<array::IntoIter<I::Item, N>>,
|
||||
@ -30,14 +30,14 @@ where
|
||||
/// Returns an iterator over the remaining elements of the original iterator
|
||||
/// that are not going to be returned by this iterator. The returned
|
||||
/// iterator will yield at most `N-1` elements.
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
#[inline]
|
||||
pub fn into_remainder(self) -> Option<array::IntoIter<I::Item, N>> {
|
||||
self.remainder
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
impl<I, const N: usize> Iterator for ArrayChunks<I, N>
|
||||
where
|
||||
I: Iterator,
|
||||
@ -91,7 +91,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
impl<I, const N: usize> DoubleEndedIterator for ArrayChunks<I, N>
|
||||
where
|
||||
I: DoubleEndedIterator + ExactSizeIterator,
|
||||
@ -162,10 +162,10 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
impl<I, const N: usize> FusedIterator for ArrayChunks<I, N> where I: FusedIterator {}
|
||||
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
impl<I, const N: usize> ExactSizeIterator for ArrayChunks<I, N>
|
||||
where
|
||||
I: ExactSizeIterator,
|
||||
|
@ -33,7 +33,7 @@ pub use self::{
|
||||
scan::Scan, skip::Skip, skip_while::SkipWhile, take::Take, take_while::TakeWhile, zip::Zip,
|
||||
};
|
||||
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
pub use self::array_chunks::ArrayChunks;
|
||||
|
||||
#[unstable(feature = "std_internals", issue = "none")]
|
||||
|
@ -398,7 +398,7 @@ pub use self::traits::{
|
||||
|
||||
#[stable(feature = "iter_zip", since = "1.59.0")]
|
||||
pub use self::adapters::zip;
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
pub use self::adapters::ArrayChunks;
|
||||
#[unstable(feature = "std_internals", issue = "none")]
|
||||
pub use self::adapters::ByRefSized;
|
||||
|
@ -3351,7 +3351,7 @@ pub trait Iterator {
|
||||
/// }
|
||||
/// ```
|
||||
#[track_caller]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "none")]
|
||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
|
||||
where
|
||||
Self: Sized,
|
||||
|
Loading…
Reference in New Issue
Block a user