]> git.lizzy.rs Git - rust.git/commitdiff
Simplify equality checks.
authorCorey Farwell <coreyf@rwell.org>
Sun, 2 Oct 2016 01:18:33 +0000 (21:18 -0400)
committerCorey Farwell <coreyf@rwell.org>
Mon, 3 Oct 2016 01:58:22 +0000 (21:58 -0400)
src/librustdoc/test.rs

index 5221679e6cdc1aa18f3cd95db258ed7da9bc3e8f..ed9efca77e7a96f03ac36d1bf025fe86cf9604ad 100644 (file)
@@ -264,9 +264,9 @@ fn drop(&mut self) {
         Ok(r) => {
             match r {
                 Err(count) => {
-                    if count > 0 && compile_fail == false {
+                    if count > 0 && !compile_fail {
                         sess.fatal("aborting due to previous error(s)")
-                    } else if count == 0 && compile_fail == true {
+                    } else if count == 0 && compile_fail {
                         panic!("test compiled while it wasn't supposed to")
                     }
                     if count > 0 && error_codes.len() > 0 {
@@ -279,7 +279,7 @@ fn drop(&mut self) {
             }
         }
         Err(_) => {
-            if compile_fail == false {
+            if !compile_fail {
                 panic!("couldn't compile the test");
             }
             if error_codes.len() > 0 {