Skip to content

Commit a6da0e9

Browse files
committed
changed a line from an if else to std::cmp::max
1 parent fa2cfaf commit a6da0e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_errors/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ impl EmitterWriter {
10491049

10501050
for sub in children {
10511051
let sub_result = self.get_multispan_max_line_num(&sub.span);
1052-
max = if sub_result > max { sub_result } else { max };
1052+
max = std::cmp::max(sub_result, max);
10531053
}
10541054
max
10551055
}

0 commit comments

Comments
 (0)