We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9995dcc commit a318856Copy full SHA for a318856
src/range.rs
@@ -11,7 +11,7 @@ use {
11
/// # Translation from `text_unit`
12
///
13
/// - `TextRange::from_to(from, to)` ⟹ `TextRange(from, to)`
14
-/// - `TextRange::offset_len(offset, size)` ⟹ `TextRange::before(size).offset(offset)`
+/// - `TextRange::offset_len(offset, size)` ⟹ `TextRange::up_to(size).offset(offset)`
15
/// - `range.start()` ⟹ `range.start()`
16
/// - `range.end()` ⟹ `range.end()`
17
/// - `range.len()` ⟹ `range.len()`
@@ -58,7 +58,7 @@ impl TextRange {
58
59
/// Create a range up to the given end (`..end`).
60
#[inline]
61
- pub const fn before(end: TextSize) -> TextRange {
+ pub const fn up_to(end: TextSize) -> TextRange {
62
TextRange {
63
start: TextSize::zero(),
64
end,
0 commit comments