Auto merge of #65827 - AnthonyMikh:out_of_the_loop, r=estebank
Remove a loop which runs exactly once Though the code seems to work properly, it is worth removing the loop entirely in order to not confuse the reader. r? @estebank
This commit is contained in:
commit
8b07292671
1 changed files with 3 additions and 4 deletions
|
@ -1816,10 +1816,9 @@ impl FileWithAnnotatedLines {
|
|||
// Every `|` that joins the beginning of the span (`___^`) to the end (`|__^`).
|
||||
add_annotation_to_file(&mut output, file.clone(), line, ann.as_line());
|
||||
}
|
||||
if middle < ann.line_end - 1 {
|
||||
for line in ann.line_end - 1..ann.line_end {
|
||||
add_annotation_to_file(&mut output, file.clone(), line, ann.as_line());
|
||||
}
|
||||
let line_end = ann.line_end - 1;
|
||||
if middle < line_end {
|
||||
add_annotation_to_file(&mut output, file.clone(), line_end, ann.as_line());
|
||||
}
|
||||
} else {
|
||||
end_ann.annotation_type = AnnotationType::Singleline;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue