]> git.lizzy.rs Git - rust.git/commitdiff
Update exception-safety.md
authorLuxko <liarluxlux@gmail.com>
Thu, 23 Feb 2017 07:44:27 +0000 (01:44 -0600)
committerGitHub <noreply@github.com>
Thu, 23 Feb 2017 07:44:27 +0000 (01:44 -0600)
Fix variable name typo

src/doc/nomicon/src/exception-safety.md

index 80e72cd5e36c94404ab2b2be8da6c3e7a20ebf02..0fb98a617688e7a97c2b603570bcf00cebfcf4ef 100644 (file)
@@ -93,7 +93,7 @@ uselessly. We would rather have the following:
 ```text
 bubble_up(heap, index):
     let elem = heap[index]
-    while index != 0 && element < heap[parent(index)]:
+    while index != 0 && elem < heap[parent(index)]:
         heap[index] = heap[parent(index)]
         index = parent(index)
     heap[index] = elem