Skip to content

Commit 29df013

Browse files
committed
Use pattern matching instead of manually checking condition
1 parent ceb9b7d commit 29df013

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/integration.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,8 @@ fn integration_test() {
6868
}
6969

7070
match output.status.code() {
71-
Some(code) => {
72-
if code == 0 {
73-
println!("Compilation successful");
74-
} else {
75-
eprintln!("Compilation failed. Exit code: {}", code);
76-
}
77-
},
71+
Some(0) => println!("Compilation successful"),
72+
Some(code) => eprintln!("Compilation failed. Exit code: {}", code),
7873
None => panic!("Process terminated by signal"),
7974
}
8075
}

0 commit comments

Comments
 (0)