Fix warning

This commit is contained in:
Antonio Scandurra 2022-04-14 13:03:46 +02:00
parent 1a1d670104
commit 6d33697e82

View File

@ -559,11 +559,6 @@ impl WrapSnapshot {
Patch::new(wrap_edits)
}
pub fn text_chunks(&self, wrap_row: u32) -> impl Iterator<Item = &str> {
self.chunks(wrap_row..self.max_point().row() + 1, false, None)
.map(|h| h.text)
}
pub fn chunks<'a>(
&'a self,
rows: Range<u32>,
@ -1286,6 +1281,11 @@ mod tests {
self.text_chunks(0).collect()
}
pub fn text_chunks(&self, wrap_row: u32) -> impl Iterator<Item = &str> {
self.chunks(wrap_row..self.max_point().row() + 1, false, None)
.map(|h| h.text)
}
fn verify_chunks(&mut self, rng: &mut impl Rng) {
for _ in 0..5 {
let mut end_row = rng.gen_range(0..=self.max_point().row());