Skip to content

Commit

Permalink
changed a line from an if else to std::cmp::max
Browse files Browse the repository at this point in the history
  • Loading branch information
hman523 committed Sep 24, 2019
1 parent fa2cfaf commit a6da0e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_errors/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ impl EmitterWriter {

for sub in children {
let sub_result = self.get_multispan_max_line_num(&sub.span);
max = if sub_result > max { sub_result } else { max };
max = std::cmp::max(sub_result, max);
}
max
}
Expand Down

0 comments on commit a6da0e9

Please sign in to comment.