Skip to content

Commit

Permalink
fix(span): correct doc comments (#3608)
Browse files Browse the repository at this point in the history
Fix doc comments for `Span` methods. `Span` offsets are in bytes, not
characters.
  • Loading branch information
overlookmotel authored Jun 10, 2024
1 parent c95d691 commit d65202d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_span/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Span {
Self { start: at, end: at }
}

/// Create a new [`Span`] starting at `start` and covering `size` characters.
/// Create a new [`Span`] starting at `start` and covering `size` bytes.
///
/// # Example
/// ```
Expand All @@ -88,7 +88,7 @@ impl Span {
Self::new(start, start + size)
}

/// Get the number of characters covered by the [`Span`].
/// Get the number of bytes covered by the [`Span`].
///
/// # Example
/// ```
Expand Down

0 comments on commit d65202d

Please sign in to comment.