Skip to content

Collecting from iterator skips Nth item #365

Closed
@Gingeh

Description

@Gingeh

Code to reproduce:

use smallvec::SmallVec;

fn main() {
    let input = "0123456";
    let collected: SmallVec<char, 4> = input
        .chars()
        .collect();

    println!("{collected:?}");
    // expected: ['0', '1', '2', '3', '4', '5', '6']
    // actual:   ['0', '1', '2', '3', '5', '6']
}

This only occurs in 2.0 alpha versions, it also did not occur when collecting from a range.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions