Make BlockMap randomized test pass in low-complexity cases

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-15 16:47:30 +01:00
parent 296944e34d
commit cebab56c94
2 changed files with 19 additions and 29 deletions

View file

@ -94,16 +94,6 @@ impl Rope {
self.append(suffix);
}
pub fn starts_with(&self, text: &str) -> bool {
self.chunks().flat_map(|c| c.bytes()).eq(text.bytes())
}
pub fn ends_with(&self, text: &str) -> bool {
self.reversed_chunks_in_range(0..self.len())
.flat_map(|c| c.bytes().rev())
.eq(text.bytes().rev())
}
fn check_invariants(&self) {
#[cfg(test)]
{