diff options
author | Bryant Mairs <bryantmairs@google.com> | 2017-12-15 15:22:01 -0800 |
---|---|---|
committer | Bryant Mairs <bryantmairs@google.com> | 2017-12-20 07:05:04 -0800 |
commit | 46fe1319a73a9d4c0081c2b5f8900d7943f3a44b (patch) | |
tree | 7d7547cf70e4e0f9adb3feb4bcdf167eeb668b1a /test/sys/test_ptrace.rs | |
parent | 7b4402f091ccac878f3cbb772a6df20ba7a7a9e6 (diff) | |
download | nix-46fe1319a73a9d4c0081c2b5f8900d7943f3a44b.zip |
Remove useless Err(_) match arms
Diffstat (limited to 'test/sys/test_ptrace.rs')
-rw-r--r-- | test/sys/test_ptrace.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/sys/test_ptrace.rs b/test/sys/test_ptrace.rs index d3e579f3..f31ba877 100644 --- a/test/sys/test_ptrace.rs +++ b/test/sys/test_ptrace.rs @@ -66,8 +66,8 @@ fn test_ptrace_cont() { return; } - match fork() { - Ok(Child) => { + match fork().expect("Error: Fork Failed") { + Child => { ptrace::traceme().unwrap(); // As recommended by ptrace(2), raise SIGTRAP to pause the child // until the parent is ready to continue @@ -76,7 +76,7 @@ fn test_ptrace_cont() { } }, - Ok(Parent { child }) => { + Parent { child } => { assert_eq!(waitpid(child, None), Ok(WaitStatus::Stopped(child, Signal::SIGTRAP))); ptrace::cont(child, None).unwrap(); assert_eq!(waitpid(child, None), Ok(WaitStatus::Stopped(child, Signal::SIGTRAP))); @@ -86,6 +86,5 @@ fn test_ptrace_cont() { _ => panic!("The process should have been killed"), } }, - Err(_) => panic!("Error: Fork Failed") } } |