clean tests/ui/short_circuit_statement.rs

Cleaning the empty lines for clarity.
This commit is contained in:
Luis de Bethencourt 2017-05-11 15:45:02 +01:00
parent ffb768cf8d
commit c79a350c55
2 changed files with 8 additions and 17 deletions

View File

@ -5,17 +5,8 @@
fn main() { fn main() {
f() && g(); f() && g();
f() || g(); f() || g();
1 == 2 || g(); 1 == 2 || g();
} }
fn f() -> bool { fn f() -> bool {

View File

@ -11,16 +11,16 @@ note: lint level defined here
| ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^
error: boolean short circuit operator in statement may be clearer using an explicit test error: boolean short circuit operator in statement may be clearer using an explicit test
--> $DIR/short_circuit_statement.rs:11:5 --> $DIR/short_circuit_statement.rs:8:5
| |
11 | f() || g(); 8 | f() || g();
| ^^^^^^^^^^^ help: replace it with `if !f() { g(); }` | ^^^^^^^^^^^ help: replace it with `if !f() { g(); }`
error: boolean short circuit operator in statement may be clearer using an explicit test error: boolean short circuit operator in statement may be clearer using an explicit test
--> $DIR/short_circuit_statement.rs:15:5 --> $DIR/short_circuit_statement.rs:9:5
| |
15 | 1 == 2 || g(); 9 | 1 == 2 || g();
| ^^^^^^^^^^^^^^ help: replace it with `if !(1 == 2) { g(); }` | ^^^^^^^^^^^^^^ help: replace it with `if !(1 == 2) { g(); }`
error: aborting due to 3 previous errors error: aborting due to 3 previous errors