about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhman523 <shbarbella@gmail.com>2019-09-23 19:51:15 -0500
committerhman523 <shbarbella@gmail.com>2019-09-23 19:51:15 -0500
commita6da0e921b01352dbdf45320afc9e41f27ac5784 (patch)
tree3d8b056841f0fb55cfcbd9af21dc5f09ed71dd5b
parentfa2cfaf064ecda727fb922864a8eafbae1875228 (diff)
downloadrust-a6da0e921b01352dbdf45320afc9e41f27ac5784.tar.gz
rust-a6da0e921b01352dbdf45320afc9e41f27ac5784.zip
changed a line from an if else to std::cmp::max
-rw-r--r--src/librustc_errors/emitter.rs2
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
     }