Skip to content

Commit dcb4cec

Browse files
committed
2
1 parent 58ed302 commit dcb4cec

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/helpers.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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 {

src/rope.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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 {

src/sum_tree/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ use std::marker::PhantomData;
77
use std::mem;
88
use std::{cmp::Ordering, fmt, iter::FromIterator, sync::Arc};
99

10-
#[cfg(test)]
11-
pub const TREE_BASE: usize = 2;
12-
#[cfg(not(test))]
1310
pub const TREE_BASE: usize = 6;
1411

1512
/// An item that can be stored in a [`SumTree`]

0 commit comments

Comments
 (0)