diff options
author | Alan Somers <asomers@gmail.com> | 2019-08-30 16:33:18 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2019-09-04 09:15:52 -0600 |
commit | 6a1c217b22017a7f37f3426259c394b1f305ff4a (patch) | |
tree | 785be7555521b922ebea9b46c740197d255157ce /test/sys/test_signalfd.rs | |
parent | 06392c6a2656b180fbd801be5ac92bcb4f2c6949 (diff) | |
download | nix-6a1c217b22017a7f37f3426259c394b1f305ff4a.zip |
Replace Signal::from_c_int by Signal::try_from
TryFrom wasn't stable when that function was written.
Diffstat (limited to 'test/sys/test_signalfd.rs')
-rw-r--r-- | test/sys/test_signalfd.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sys/test_signalfd.rs b/test/sys/test_signalfd.rs index a3b60988..92759a48 100644 --- a/test/sys/test_signalfd.rs +++ b/test/sys/test_signalfd.rs @@ -1,3 +1,5 @@ +use std::convert::TryFrom; + #[test] fn test_signalfd() { use nix::sys::signalfd::SignalFd; @@ -20,6 +22,6 @@ fn test_signalfd() { // And now catch that same signal. let res = fd.read_signal().unwrap().unwrap(); - let signo = Signal::from_c_int(res.ssi_signo as i32).unwrap(); + let signo = Signal::try_from(res.ssi_signo as i32).unwrap(); assert_eq!(signo, signal::SIGUSR1); } |