fix(wavl): do not check for v if not needed

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-01-30 15:49:32 +01:00
parent f66dec1e03
commit 458ffdb3ff
No known key found for this signature in database
GPG key ID: 332171FADF1DB90B

View file

@ -50,7 +50,7 @@ class WAVLTree(AVLTree[T]):
w_diff = Node.difference(w, y)
logger.debug(f"w_diff = {w_diff}")
assert v
# assert v
if w_diff == 1 and y.parent:
logger.debug(f"y.parent = {y.parent}")
new_root = rotate_left(y.parent)