You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this is intended behavior, then it should probably be documented, as the current documentation of ArrayChunks::into_remainder states that it:
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.
jwong101
changed the title
std::iterator::ArrayChunks does not return the remainder if None is never yielded
core::iter::ArrayChunks does not return the remainder if None is never yielded
Apr 1, 2024
oli-obk
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Apr 3, 2024
Rollup merge of rust-lang#123406 - krtab:fix_remainder_iterchunk, r=scottmcm
Force exhaustion in iter::ArrayChunks::into_remainder
Closes: rust-lang#123333
I tried this code:
I expected to see this happen:
There should be a remainder as
1
will not be yielded.Instead, this happened:
If this is intended behavior, then it should probably be documented, as the current documentation of ArrayChunks::into_remainder states that it:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: