Skip to content

Commit 2f51fdf

Browse files
committed
fix: use match in test_find
Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
1 parent f451ef6 commit 2f51fdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ mod tests {
121121
if stdout_path != "serial0" {
122122
panic!("wrong /chosen/stdout-path value");
123123
}
124-
if let None = node.find(&stdout_path) {
125-
panic!("unable to find stdout-path node.");
124+
match node.find(&stdout_path) {
125+
Some(_) => (),
126+
None => panic!("unable to find stdout-path node."),
126127
}
127128
}
128129
None => panic!("failed to find /chosen/stdout-path"),

0 commit comments

Comments
 (0)