diff options
| author | hman523 <shbarbella@gmail.com> | 2019-09-23 19:51:15 -0500 |
|---|---|---|
| committer | hman523 <shbarbella@gmail.com> | 2019-09-23 19:51:15 -0500 |
| commit | a6da0e921b01352dbdf45320afc9e41f27ac5784 (patch) | |
| tree | 3d8b056841f0fb55cfcbd9af21dc5f09ed71dd5b | |
| parent | fa2cfaf064ecda727fb922864a8eafbae1875228 (diff) | |
| download | rust-a6da0e921b01352dbdf45320afc9e41f27ac5784.tar.gz rust-a6da0e921b01352dbdf45320afc9e41f27ac5784.zip | |
changed a line from an if else to std::cmp::max
| -rw-r--r-- | src/librustc_errors/emitter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index c13a4b8dbb4..2a89c94652a 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -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 } |
