clean tests/ui/block_in_if_condition.rs

Cleaning the empty lines for clarity.
This commit is contained in:
Luis de Bethencourt 2017-05-10 15:40:40 +01:00
parent 0c9d9d9f6c
commit cc923b5d0e
2 changed files with 4 additions and 7 deletions

View file

@ -56,13 +56,10 @@ fn pred_test() {
// inside a closure that the condition is using. same principle applies. add some extra
// expressions to make sure linter isn't confused by them.
if v == 3 && sky == "blue" && predicate(|x| { let target = 3; x == target }, v) {
}
if predicate(|x| { let target = 3; x == target }, v) {
}
}
fn condition_is_normal() -> i32 {

View file

@ -45,15 +45,15 @@ error: in an 'if' condition, avoid complex blocks or closures with blocks; inste
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let'
--> $DIR/block_in_if_condition.rs:62:22
--> $DIR/block_in_if_condition.rs:61:22
|
62 | if predicate(|x| { let target = 3; x == target }, v) {
61 | if predicate(|x| { let target = 3; x == target }, v) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: this boolean expression can be simplified
--> $DIR/block_in_if_condition.rs:70:8
--> $DIR/block_in_if_condition.rs:67:8
|
70 | if true && x == 3 {
67 | if true && x == 3 {
| ^^^^^^^^^^^^^^ help: try `x == 3`
|
note: lint level defined here