File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -30,19 +30,17 @@ fn test_ptrace_getevent() {
30
30
// Just make sure ptrace_getsiginfo can be called at all, for now.
31
31
#[ test]
32
32
fn test_ptrace_getsiginfo ( ) {
33
- match ptrace:: getsiginfo ( getpid ( ) ) {
34
- Err ( Error :: UnsupportedOperation ) => panic ! ( "ptrace_getsiginfo returns Error::UnsupportedOperation!" ) ,
35
- _ => ( ) ,
33
+ if let Err ( Error :: UnsupportedOperation ) = ptrace:: getsiginfo ( getpid ( ) ) {
34
+ panic ! ( "ptrace_getsiginfo returns Error::UnsupportedOperation!" ) ;
36
35
}
37
36
}
38
37
39
38
// Just make sure ptrace_setsiginfo can be called at all, for now.
40
39
#[ test]
41
40
fn test_ptrace_setsiginfo ( ) {
42
41
let siginfo = unsafe { mem:: uninitialized ( ) } ;
43
- match ptrace:: setsiginfo ( getpid ( ) , & siginfo) {
44
- Err ( Error :: UnsupportedOperation ) => panic ! ( "ptrace_setsiginfo returns Error::UnsupportedOperation!" ) ,
45
- _ => ( ) ,
42
+ if let Err ( Error :: UnsupportedOperation ) = ptrace:: setsiginfo ( getpid ( ) , & siginfo) {
43
+ panic ! ( "ptrace_setsiginfo returns Error::UnsupportedOperation!" ) ;
46
44
}
47
45
}
48
46
You can’t perform that action at this time.
0 commit comments