File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 5
5
#[ cfg( test) ]
6
6
mod tests;
7
7
8
- use std:: { iter, mem} ;
9
-
10
8
use nohash_hasher:: IntMap as NoHashHashMap ;
11
9
use text_size:: { TextRange , TextSize } ;
12
10
@@ -98,7 +96,7 @@ impl LineIndex {
98
96
99
97
// Save any utf-16 characters seen in the previous line
100
98
if !wide_chars. is_empty ( ) {
101
- line_wide_chars. insert ( line, mem:: take ( & mut wide_chars) ) ;
99
+ line_wide_chars. insert ( line, std :: mem:: take ( & mut wide_chars) ) ;
102
100
}
103
101
104
102
// Prepare for processing the next line
@@ -156,9 +154,9 @@ impl LineIndex {
156
154
pub fn lines ( & self , range : TextRange ) -> impl Iterator < Item = TextRange > + ' _ {
157
155
let lo = self . newlines . partition_point ( |& it| it < range. start ( ) ) ;
158
156
let hi = self . newlines . partition_point ( |& it| it <= range. end ( ) ) ;
159
- let all = iter:: once ( range. start ( ) )
157
+ let all = std :: iter:: once ( range. start ( ) )
160
158
. chain ( self . newlines [ lo..hi] . iter ( ) . copied ( ) )
161
- . chain ( iter:: once ( range. end ( ) ) ) ;
159
+ . chain ( std :: iter:: once ( range. end ( ) ) ) ;
162
160
163
161
all. clone ( )
164
162
. zip ( all. skip ( 1 ) )
You can’t perform that action at this time.
0 commit comments