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:
John Nunley 2023-09-04 13:12:42 -07:00 committed by GitHub
parent 792618094c
commit 7718565d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 9 deletions

View File

@ -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"

View File

@ -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();

View File

@ -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<()>;
}