Fix clippy::single_match warning in test
``` warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> tests/std.rs:26:5 | 26 | / match Command::new("if-this-is-a-binary-then-the-world-has-ended").spawn() { 27 | | Ok(..) => panic!(), 28 | | Err(..) => {} 29 | | } | |_____^ help: try this: `if let Ok(..) = Command::new("if-this-is-a-binary-then-the-world-has-ended").spawn() { panic!() }` | = note: `#[warn(clippy::single_match)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match ```
This commit is contained in:
parent
bffd4efe40
commit
fbc300608c
|
@ -23,10 +23,9 @@ fn smoke() {
|
|||
|
||||
#[test]
|
||||
fn smoke_failure() {
|
||||
match Command::new("if-this-is-a-binary-then-the-world-has-ended").spawn() {
|
||||
Ok(..) => panic!(),
|
||||
Err(..) => {}
|
||||
}
|
||||
assert!(Command::new("if-this-is-a-binary-then-the-world-has-ended")
|
||||
.spawn()
|
||||
.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in New Issue