Skip to content

RangeFrom<u8> stops at 254 #24119

Closed
@phaylon

Description

@phaylon

I tried printing all valid u8s by doing

for n in 0u8.. {
    println!("{}", n);
}

and was surprised to find it only printed up to 254.

I'm unsure if this is supposed to be this way (range_inclusive can be used). If so, I'd propose adding this to the Iterators/Ranges section of the book.

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