File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -105,19 +105,18 @@ impl TextRange {
105
105
TextRange ( start, end)
106
106
}
107
107
108
- /// Check if this range contains a point .
108
+ /// Check if this range contains an offset .
109
109
///
110
110
/// 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 ( )
114
113
}
115
114
116
- /// Check if this range contains a point .
115
+ /// Check if this range contains an offset .
117
116
///
118
117
/// 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 ( ) ;
121
120
self . start ( ) <= point && point <= self . end ( )
122
121
}
123
122
}
You can’t perform that action at this time.
0 commit comments