Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0125343

Browse files
committed
Pacify clippy
1 parent a64f9e7 commit 0125343

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

ui_test/src/parser/tests.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ fn main() {
3030
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ encountered a dangling reference (address $HEX is unallocated)
3131
}
3232
";
33-
match Comments::parse(Path::new("<dummy>"), s) {
34-
Ok(_) => panic!("expected parsing to fail"),
35-
Err(_) => {}
36-
}
33+
assert!(Comments::parse(Path::new("<dummy>"), s).is_err(), "expected parsing to fail");
3734
}
3835

3936
#[test]
@@ -55,10 +52,7 @@ fn parse_slash_slash_at_fail() {
5552
use std::mem;
5653
5754
";
58-
match Comments::parse(Path::new("<dummy>"), s) {
59-
Ok(_) => panic!("expected parsing to fail"),
60-
Err(_) => {}
61-
}
55+
assert!(Comments::parse(Path::new("<dummy>"), s).is_err(), "expected parsing to fail");
6256
}
6357

6458
#[test]
@@ -68,8 +62,5 @@ fn missing_colon_fail() {
6862
use std::mem;
6963
7064
";
71-
match Comments::parse(Path::new("<dummy>"), s) {
72-
Ok(_) => panic!("expected parsing to fail"),
73-
Err(_) => {}
74-
}
65+
assert!(Comments::parse(Path::new("<dummy>"), s).is_err(), "expected parsing to fail");
7566
}

0 commit comments

Comments
 (0)