Skip to content

Commit 578ec6f

Browse files
committed
Remove stray Intos
1 parent 616d55b commit 578ec6f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/range.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,18 @@ impl TextRange {
105105
TextRange(start, end)
106106
}
107107

108-
/// Check if this range contains a point.
108+
/// Check if this range contains an offset.
109109
///
110110
/// The end index is considered excluded.
111-
pub fn contains_exclusive(self, point: impl Into<TextSize>) -> bool {
112-
let point = point.into();
113-
self.start() <= point && point < self.end()
111+
pub fn contains_exclusive(self, offset: TextSize) -> bool {
112+
self.start() <= offset && offset < self.end()
114113
}
115114

116-
/// Check if this range contains a point.
115+
/// Check if this range contains an offset.
117116
///
118117
/// The end index is considered included.
119-
pub fn contains_inclusive(self, point: impl Into<TextSize>) -> bool {
120-
let point = point.into();
118+
pub fn contains_inclusive(self, offset: TextSize) -> bool {
119+
let point = offset.into();
121120
self.start() <= point && point <= self.end()
122121
}
123122
}

0 commit comments

Comments
 (0)