- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
I tried this code:
#![feature(iter_array_chunks)]
fn main() {
    let line = "abc";
    let mut chunks = line.chars().array_chunks::<3>();
    let _result: Vec<_> = chunks.by_ref().collect();
    if let Some(rem) = chunks.into_remainder() {
        assert!(rem.count() != 0);
    }
}I expected to see this happen: into_remainder returns None when there is no remainder
Instead, this happened: into_remainder returns Some of an iterator with zero elements
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.