mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Use pattern matching instead of manually checking condition
This commit is contained in:
parent
ceb9b7d66d
commit
29df0139dc
1 changed files with 2 additions and 7 deletions
|
@ -68,13 +68,8 @@ fn integration_test() {
|
|||
}
|
||||
|
||||
match output.status.code() {
|
||||
Some(code) => {
|
||||
if code == 0 {
|
||||
println!("Compilation successful");
|
||||
} else {
|
||||
eprintln!("Compilation failed. Exit code: {}", code);
|
||||
}
|
||||
},
|
||||
Some(0) => println!("Compilation successful"),
|
||||
Some(code) => eprintln!("Compilation failed. Exit code: {}", code),
|
||||
None => panic!("Process terminated by signal"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue