Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider modelling spans with RangeInclusive #370

Open
414owen opened this issue Dec 22, 2024 · 0 comments
Open

Consider modelling spans with RangeInclusive #370

414owen opened this issue Dec 22, 2024 · 0 comments

Comments

@414owen
Copy link

414owen commented Dec 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant