Skip to content

Commit 70c1621

Browse files
authored
Update avl.rs
1 parent d577a17 commit 70c1621

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/avl.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,13 @@ impl<K: Ord, V> Node<K, V> {
314314
if left.balance_factor() == 1 {
315315
left.rotate_left();
316316
}
317-
assert!(left.balance_factor().abs() <= 1);
318317
self.rotate_right();
319318
} else if self.balance_factor() == 2 { // `self` is right-heavy.
320319
let right: &mut Node<K, V> = self.right.as_deref_mut().unwrap();
321320
assert!(right.balance_factor().abs() <= 1);
322321
if right.balance_factor() == -1 {
323322
right.rotate_right();
324323
}
325-
assert!(right.balance_factor().abs() <= 1);
326324
self.rotate_left();
327325
}
328326
assert!(self.balance_factor().abs() <= 1);

0 commit comments

Comments
 (0)