Skip to content

FromIterator impl gives a corrupt vacant list #100

@alecmocatta

Description

@alecmocatta
fn main() {
    let x: slab::Slab<()> = std::iter::once((1, ())).collect();
}

This gives a slab with a corrupt vacant list. Once corrupted, I was hitting this panic https://github.com/tokio-rs/slab/blob/v0.4.3/src/lib.rs#L942

Patching vacant_list_broken = true; is a workaround.

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