Skip to content

Commit b55468c

Browse files
committed
Simplify equality checks.
1 parent 5b9ba4c commit b55468c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
264264
Ok(r) => {
265265
match r {
266266
Err(count) => {
267-
if count > 0 && compile_fail == false {
267+
if count > 0 && !compile_fail {
268268
sess.fatal("aborting due to previous error(s)")
269-
} else if count == 0 && compile_fail == true {
269+
} else if count == 0 && compile_fail {
270270
panic!("test compiled while it wasn't supposed to")
271271
}
272272
if count > 0 && error_codes.len() > 0 {
@@ -279,7 +279,7 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
279279
}
280280
}
281281
Err(_) => {
282-
if compile_fail == false {
282+
if !compile_fail {
283283
panic!("couldn't compile the test");
284284
}
285285
if error_codes.len() > 0 {

0 commit comments

Comments
 (0)