File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -1279,8 +1279,7 @@ impl<'a> SourceText<'a> for Rope<'a> {
12791279 // Split the text into lines, including the line ending character.
12801280 // If the text ends with a newline, the last line will be ignored
12811281 // For example: "abc\nefg\n" => ["abc\n", "efg\n"]
1282- // self.lines_impl(false)
1283- [ ] . into_iter ( )
1282+ self . lines_impl ( false )
12841283 }
12851284
12861285 #[ inline]
@@ -1289,8 +1288,7 @@ impl<'a> SourceText<'a> for Rope<'a> {
12891288 }
12901289
12911290 fn char_indices ( & self ) -> impl Iterator < Item = ( usize , char ) > {
1292- // self.char_indices()
1293- [ ] . into_iter ( )
1291+ self . char_indices ( )
12941292 }
12951293
12961294 fn byte_slice ( & self , range : Range < usize > ) -> Self {
Original file line number Diff line number Diff line change @@ -182,10 +182,12 @@ impl<'a> Rope<'a> {
182182 /// Returns an iterator over the characters and their byte positions.
183183 pub fn char_indices ( & self ) -> CharIndices < ' _ , ' a > {
184184 match & self . repr {
185- Repr :: Light ( s) => CharIndices {
186- iter : CharIndicesEnum :: Light {
187- iter : s. char_indices ( ) ,
188- } ,
185+ Repr :: Light ( s) => {
186+ CharIndices {
187+ iter : CharIndicesEnum :: Light {
188+ iter : s. char_indices ( ) ,
189+ } ,
190+ }
189191 } ,
190192 Repr :: Full ( chunks) => {
191193 CharIndices {
Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ use std::marker::PhantomData;
77use std:: mem;
88use std:: { cmp:: Ordering , fmt, iter:: FromIterator , sync:: Arc } ;
99
10- #[ cfg( test) ]
11- pub const TREE_BASE : usize = 2 ;
12- #[ cfg( not( test) ) ]
1310pub const TREE_BASE : usize = 6 ;
1411
1512/// An item that can be stored in a [`SumTree`]
You can’t perform that action at this time.
0 commit comments