From a89297b33486e08d37a173421d2958677f676626 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 4 Sep 2023 13:06:41 -0700 Subject: [PATCH] Fix failing doctests Signed-off-by: John Nunley --- src/os/kqueue.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/os/kqueue.rs b/src/os/kqueue.rs index 982640b..f670527 100644 --- a/src/os/kqueue.rs +++ b/src/os/kqueue.rs @@ -37,7 +37,7 @@ pub trait PollerKqueueExt: PollerSealed { /// let poller = Poller::new().unwrap(); /// /// // Register the SIGINT signal. - /// poller.add_filter(Signal(libc::SIGINT), 0, PollMode::Oneshot).unwrap(); + /// poller.add_filter(Signal(rustix::process::Signal::Int as _), 0, PollMode::Oneshot).unwrap(); /// /// // Wait for the signal. /// let mut events = Events::new(); @@ -60,10 +60,10 @@ pub trait PollerKqueueExt: PollerSealed { /// let poller = Poller::new().unwrap(); /// /// // Register the SIGINT signal. - /// poller.add_filter(Signal(libc::SIGINT), 0, PollMode::Oneshot).unwrap(); + /// poller.add_filter(Signal(rustix::process::Signal::Int as _), 0, PollMode::Oneshot).unwrap(); /// /// // Re-register with a different key. - /// poller.modify_filter(Signal(libc::SIGINT), 1, PollMode::Oneshot).unwrap(); + /// poller.modify_filter(Signal(rustix::process::Signal::Int as _), 1, PollMode::Oneshot).unwrap(); /// /// // Wait for the signal. /// let mut events = Events::new(); @@ -86,10 +86,10 @@ pub trait PollerKqueueExt: PollerSealed { /// let poller = Poller::new().unwrap(); /// /// // Register the SIGINT signal. - /// poller.add_filter(Signal(libc::SIGINT), 0, PollMode::Oneshot).unwrap(); + /// poller.add_filter(Signal(rustix::process::Signal::Int as _), 0, PollMode::Oneshot).unwrap(); /// /// // Remove the filter. - /// poller.delete_filter(Signal(libc::SIGINT)).unwrap(); + /// poller.delete_filter(Signal(rustix::process::Signal::Int as _)).unwrap(); /// ``` fn delete_filter(&self, filter: F) -> io::Result<()>; }