Skip to content

Commit

Permalink
docs: document that Label::new expects char offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
not-my-profile authored and zesterer committed Aug 30, 2023
1 parent e9e1c43 commit 9bead87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub struct Label<S = Range<usize>> {

impl<S> Label<S> {
/// Create a new [`Label`].
/// If the span is specified as a `Range<usize>` the numbers have to be zero-indexed character offsets.
pub fn new(span: S) -> Self {
Self {
span,
Expand Down

0 comments on commit 9bead87

Please sign in to comment.