mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 02:37:21 +00:00
📝
This commit is contained in:
parent
e2c19d3d3f
commit
9f9f339a75
1 changed files with 2 additions and 7 deletions
|
@ -87,16 +87,11 @@ impl Rope {
|
|||
fn check_invariants(&self) {
|
||||
#[cfg(test)]
|
||||
{
|
||||
// Ensure all chunks except maybe the last one are not underflowing.
|
||||
let mut chunks = self.chunks.cursor::<(), ()>().peekable();
|
||||
chunks.next();
|
||||
while let Some(chunk) = chunks.next() {
|
||||
if chunks.peek().is_some() {
|
||||
assert!(
|
||||
chunk.0.len() >= CHUNK_BASE,
|
||||
"Underflowing chunk: {:?}\nChunks: {:?}",
|
||||
chunk,
|
||||
self.chunks.items()
|
||||
);
|
||||
assert!(chunk.0.len() >= CHUNK_BASE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue