Skip to content

Source annotate ranges should use bytes not chars #77

Closed
@Muscraft

Description

@Muscraft

Currently, SourceAnnotation's range field is based on chars, not bytes. This can be a little confusing for users and can cause issues when dealing with spans from things like toml errors. It would make more sense to have users give us bytes, and we calculate the char spans internally. This would make the API easier to use as most people can handle going to bytes, but going from bytes -> chars can be very hard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    M-breaking-changeMeta: Implementing or merging this will introduce a breaking change

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions