Use pattern matching instead of indexing tuples
This commit is contained in:
parent
55b54285c8
commit
bb442881fc
1 changed files with 2 additions and 4 deletions
|
@ -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)) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue