Skip to content

Commit bb44288

Browse files
authored
Use pattern matching instead of indexing tuples
1 parent 55b5428 commit bb44288

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustc_errors/emitter.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,10 +1734,8 @@ impl FileWithAnnotatedLines {
17341734

17351735
// Find overlapping multiline annotations, put them at different depths
17361736
multiline_annotations.sort_by_key(|&(_, ref ml)| (ml.line_start, ml.line_end));
1737-
for item in multiline_annotations.clone() {
1738-
let ann = item.1;
1739-
for item in multiline_annotations.iter_mut() {
1740-
let ref mut a = item.1;
1737+
for (_, ann) in multiline_annotations.clone() {
1738+
for (_, a) in multiline_annotations.iter_mut() {
17411739
// Move all other multiline annotations overlapping with this one
17421740
// one level to the right.
17431741
if !(ann.same_span(a)) &&

0 commit comments

Comments
 (0)