diff options
| author | AnthonyMikh <anthony.mikh@yandex.ru> | 2019-10-01 01:12:36 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-01 01:12:36 +0300 |
| commit | bb442881fc3d91175c032c8ff347c81ca59ed777 (patch) | |
| tree | ae0a673de30ebb5f5e4ebbe2636ce1f7c60b6434 /src | |
| parent | 55b54285c811b6ab12bb0ba001126fd5b7d3bd09 (diff) | |
| download | rust-bb442881fc3d91175c032c8ff347c81ca59ed777.tar.gz rust-bb442881fc3d91175c032c8ff347c81ca59ed777.zip | |
Use pattern matching instead of indexing tuples
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index d5e9d718430..28e67fa0912 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -1734,10 +1734,8 @@ impl FileWithAnnotatedLines { // Find overlapping multiline annotations, put them at different depths multiline_annotations.sort_by_key(|&(_, ref ml)| (ml.line_start, ml.line_end)); - for item in multiline_annotations.clone() { - let ann = item.1; - for item in multiline_annotations.iter_mut() { - let ref mut a = item.1; + for (_, ann) in multiline_annotations.clone() { + for (_, a) in multiline_annotations.iter_mut() { // Move all other multiline annotations overlapping with this one // one level to the right. if !(ann.same_span(a)) && |
