Make BlockMap
randomized test pass in low-complexity cases
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
296944e34d
commit
cebab56c94
2 changed files with 19 additions and 29 deletions
|
@ -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)]
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue