Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | lib/text-size/src/range.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/text-size/src/range.rs b/lib/text-size/src/range.rs index 6484d2ea34..507de3a5fb 100644 --- a/lib/text-size/src/range.rs +++ b/lib/text-size/src/range.rs @@ -11,7 +11,7 @@ use { /// # Translation from `text_unit` /// /// - `TextRange::from_to(from, to)` ⟹ `TextRange(from, to)` -/// - `TextRange::offset_len(offset, size)` ⟹ `TextRange::to(size).offset(offset)` +/// - `TextRange::offset_len(offset, size)` ⟹ `TextRange::before(size).offset(offset)` /// - `range.start()` ⟹ `range.start()` /// - `range.end()` ⟹ `range.end()` /// - `range.len()` ⟹ `range.len()` @@ -65,17 +65,6 @@ impl TextRange { } } - /// Create a range after the given start (`start..`). - /// - /// This returns a std [`RangeFrom`] rather than `TextRange` because - /// `TextRange` does not support right-unbounded ranges. As such, this - /// should only be used for direct indexing, and bounded ranges should be - /// used for persistent ranges (`TextRange(start, TextSize::of(text))`). - #[inline] - pub const fn after(start: TextSize) -> RangeFrom<usize> { - start.raw as usize.. - } - /// Offset this range by some amount. /// /// This is typically used to convert a range from one coordinate space to |