Update exception-safety.md
This commit is contained in:
parent
84ca464f9c
commit
729948f958
@ -137,7 +137,7 @@ If Rust had `try` and `finally` like in Java, we could do the following:
|
||||
bubble_up(heap, index):
|
||||
let elem = heap[index]
|
||||
try:
|
||||
while index != 0 && element < heap[parent(index)]:
|
||||
while index != 0 && elem < heap[parent(index)]:
|
||||
heap[index] = heap[parent(index)]
|
||||
index = parent(index)
|
||||
finally:
|
||||
|
Loading…
x
Reference in New Issue
Block a user