From d65202d7885f816deb9764fc5d0d7d42375f2c98 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Mon, 10 Jun 2024 16:24:29 +0100 Subject: [PATCH] fix(span): correct doc comments (#3608) Fix doc comments for `Span` methods. `Span` offsets are in bytes, not characters. --- crates/oxc_span/src/span.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_span/src/span.rs b/crates/oxc_span/src/span.rs index 9ac0302ef..0ae456649 100644 --- a/crates/oxc_span/src/span.rs +++ b/crates/oxc_span/src/span.rs @@ -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 /// ``` @@ -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 /// ```