Skip to content

Consider modelling spans with RangeInclusive #370

@414owen

Description

@414owen

Currently labels are positioned in the text buffer using a Range<L>.
This means it's impossible to represent a label that runs until the end of the text buffer of length L::MAX, because of wraparound.
I also don't see the point of modelling a zero-width span, so RangeInclusive seems like a much tighter fit for this use-case.
We can make invalid states unrepresentable, here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions