summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryant Mairs <bryantmairs@google.com>2017-12-15 14:50:47 -0800
committerBryant Mairs <bryantmairs@google.com>2017-12-20 07:05:04 -0800
commit4bad9bf9b9bb08d29511f060a3adae7453573a72 (patch)
treecdcd65b22585353d2aa79fbeede1891b401bc33f
parent070c0176049744f63c7f553edcd74ba2376f3ec9 (diff)
downloadnix-4bad9bf9b9bb08d29511f060a3adae7453573a72.zip
Remove unnecessary .ok()
-rw-r--r--test/sys/test_signal.rs2
-rw-r--r--test/sys/test_signalfd.rs2
-rw-r--r--test/sys/test_wait.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/sys/test_signal.rs b/test/sys/test_signal.rs
index 4084a0da..ab99ab19 100644
--- a/test/sys/test_signal.rs
+++ b/test/sys/test_signal.rs
@@ -3,5 +3,5 @@ use nix::sys::signal::*;
#[test]
fn test_kill_none() {
- kill(getpid(), None).ok().expect("Should be able to send signal to myself.");
+ kill(getpid(), None).expect("Should be able to send signal to myself.");
}
diff --git a/test/sys/test_signalfd.rs b/test/sys/test_signalfd.rs
index 6d65e6a0..a2f8fd8f 100644
--- a/test/sys/test_signalfd.rs
+++ b/test/sys/test_signalfd.rs
@@ -17,7 +17,7 @@ fn test_signalfd() {
// Send a SIGUSR1 signal to the current process. Note that this uses `raise` instead of `kill`
// because `kill` with `getpid` isn't correct during multi-threaded execution like during a
// cargo test session. Instead use `raise` which does the correct thing by default.
- raise(signal::SIGUSR1).ok().expect("Error: raise(SIGUSR1) failed");
+ raise(signal::SIGUSR1).expect("Error: raise(SIGUSR1) failed");
// And now catch that same signal.
let res = fd.read_signal().unwrap().unwrap();
diff --git a/test/sys/test_wait.rs b/test/sys/test_wait.rs
index 02f32734..e834f9f0 100644
--- a/test/sys/test_wait.rs
+++ b/test/sys/test_wait.rs
@@ -14,7 +14,7 @@ fn test_wait_signal() {
match fork() {
Ok(Child) => pause().unwrap_or_else(|_| unsafe { _exit(123) }),
Ok(Parent { child }) => {
- kill(child, Some(SIGKILL)).ok().expect("Error: Kill Failed");
+ kill(child, Some(SIGKILL)).expect("Error: Kill Failed");
assert_eq!(waitpid(child, None), Ok(WaitStatus::Signaled(child, SIGKILL, false)));
},
// panic, fork should never fail unless there is a serious problem with the OS