mirror of https://github.com/smol-rs/polling
Remove libc from dev deps (#146)
Signed-off-by: John Nunley <dev@notgull.net> Signed-off-by: Alain Zscheile <fogti+devel@ytrizja.de>
This commit is contained in:
parent
792618094c
commit
7718565d11
|
@ -48,6 +48,3 @@ features = [
|
|||
[dev-dependencies]
|
||||
easy-parallel = "3.1.0"
|
||||
fastrand = "2.0.0"
|
||||
|
||||
[target.'cfg(any(unix, target_os = "fuchsia", target_os = "vxworks"))'.dev_dependencies]
|
||||
libc = "0.2"
|
||||
|
|
|
@ -20,7 +20,7 @@ mod example {
|
|||
let poller = Poller::new().unwrap();
|
||||
|
||||
// Register SIGINT in the poller.
|
||||
let sigint = Signal(libc::SIGINT);
|
||||
let sigint = Signal(rustix::process::Signal::Int as _);
|
||||
poller.add_filter(sigint, 1, PollMode::Oneshot).unwrap();
|
||||
|
||||
let mut events = Events::new();
|
||||
|
|
|
@ -37,7 +37,7 @@ pub trait PollerKqueueExt<F: Filter>: 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<F: Filter>: 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<F: Filter>: 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<()>;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue