diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-02-24 13:22:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-24 13:22:59 +0100 |
| commit | 6f9e69a0fdf0bcf89281b6aefa14ecde2a111665 (patch) | |
| tree | ae69bcb91a49dc525f4ef58330e3e3619884b7d6 /src | |
| parent | 173b725b89d1cb61a3ae54aa7778d08673e79988 (diff) | |
| parent | 729948f95853e0d7228e02dffca53539ddb0a9e0 (diff) | |
| download | rust-6f9e69a0fdf0bcf89281b6aefa14ecde2a111665.tar.gz rust-6f9e69a0fdf0bcf89281b6aefa14ecde2a111665.zip | |
Rollup merge of #40050 - DaseinPhaos:patch-3, r=steveklabnik
Update exception-safety.md Fix variable name typo
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/nomicon/src/exception-safety.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/nomicon/src/exception-safety.md b/src/doc/nomicon/src/exception-safety.md index 80e72cd5e36..a3cbc6abd69 100644 --- a/src/doc/nomicon/src/exception-safety.md +++ b/src/doc/nomicon/src/exception-safety.md @@ -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 @@ -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: |
