-
Notifications
You must be signed in to change notification settings - Fork 105
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
What are the semantics of the span in de::error? #556
Comments
It is documented as the index into the document. That would be a byte offset.
|
Thanks! I unfortunately have encountered a lot of different things people mean by index, so this helps clarifying. I've opened #558 to make this visible for everybody |
Within rust code for the |
Would it be possible to add to the documentation what the semantics of the
Option<Range<usize>>
are thattoml::de::Error::span()
returns? Is it a char offset or a byte offset, and under what conditions will it be None? I want to integrate linting of toml files into our diagnostics system and it would be great to have clarity over how these indices behave we utf-8 content.The text was updated successfully, but these errors were encountered: