Skip to content

Commit 56dcaec

Browse files
authored
Merge pull request async-rs#56 from smol-rs/deps
Update dev-dependencies
2 parents 00e42a4 + 86f4dcf commit 56dcaec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ winapi = { version = "0.3.9", features = ["winsock2"] }
3333
async-channel = "1.4.2"
3434
async-net = "1.3.0"
3535
blocking = "1.0.0"
36-
signal-hook = "0.1.16"
36+
signal-hook = "0.3"
3737
tempfile = "3.1.0"
3838

3939
[target.'cfg(target_os = "linux")'.dev-dependencies]
4040
inotify = { version = "0.9", default-features = false }
41-
nix = "0.19"
41+
nix = "0.20"
4242
timerfd = "1.1.1"
4343

4444
[target.'cfg(windows)'.dev-dependencies]
45-
uds_windows = "0.1.5"
45+
uds_windows = "1"

examples/unix-signal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
99
#[cfg(unix)]
1010
fn main() -> std::io::Result<()> {
11-
use std::os::unix::net::UnixStream;
11+
use std::os::unix::{io::AsRawFd, net::UnixStream};
1212

1313
use async_io::Async;
1414
use futures_lite::{future, prelude::*};
1515

1616
future::block_on(async {
1717
// Create a Unix stream that receives a byte on each signal occurrence.
1818
let (a, mut b) = Async::<UnixStream>::pair()?;
19-
signal_hook::pipe::register(signal_hook::SIGINT, a)?;
19+
signal_hook::low_level::pipe::register_raw(signal_hook::consts::SIGINT, a.as_raw_fd())?;
2020
println!("Waiting for Ctrl-C...");
2121

2222
// Receive a byte that indicates the Ctrl-C signal occurred.

0 commit comments

Comments
 (0)