Skip to content

Commit a318856

Browse files
committed
rename TextRange::before to up_to
1 parent 9995dcc commit a318856

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/range.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use {
1111
/// # Translation from `text_unit`
1212
///
1313
/// - `TextRange::from_to(from, to)` ⟹ `TextRange(from, to)`
14-
/// - `TextRange::offset_len(offset, size)` ⟹ `TextRange::before(size).offset(offset)`
14+
/// - `TextRange::offset_len(offset, size)` ⟹ `TextRange::up_to(size).offset(offset)`
1515
/// - `range.start()` ⟹ `range.start()`
1616
/// - `range.end()` ⟹ `range.end()`
1717
/// - `range.len()` ⟹ `range.len()`
@@ -58,7 +58,7 @@ impl TextRange {
5858

5959
/// Create a range up to the given end (`..end`).
6060
#[inline]
61-
pub const fn before(end: TextSize) -> TextRange {
61+
pub const fn up_to(end: TextSize) -> TextRange {
6262
TextRange {
6363
start: TextSize::zero(),
6464
end,

0 commit comments

Comments
 (0)