Skip to content

Commit 9d27afe

Browse files
Update signal-hook requirement from 0.3 to 0.4 (#363)
Updates the requirements on [signal-hook](https://github.com/vorner/signal-hook) to permit the latest version. - [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md) - [Commits](vorner/signal-hook@v0.3.0...v0.4.1) --- updated-dependencies: - dependency-name: signal-hook dependency-version: 0.4.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Taiki Endo <te316e89@gmail.com>
1 parent 325490c commit 9d27afe

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ hyper = { version = "1.0", default-features = false, features = ["client", "http
4343
macro_rules_attribute = "0.2.0"
4444
native-tls = "0.2"
4545
scraper = "0.25"
46-
signal-hook = "0.3"
46+
signal-hook = "0.4"
4747
smol-hyper = "0.1.0"
4848
smol-macros = "0.1.0"
4949
surf = { version = "2", default-features = false, features = ["h1-client"] }

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::{io::AsRawFd, net::UnixStream};
11+
use std::os::unix::net::UnixStream;
1212

1313
use smol::{prelude::*, Async};
1414

1515
smol::block_on(async {
1616
// Create a Unix stream that receives a byte on each signal occurrence.
1717
let (a, mut b) = Async::<UnixStream>::pair()?;
1818
// Async isn't IntoRawFd, but it is AsRawFd, so let's pass the raw fd directly.
19-
signal_hook::low_level::pipe::register_raw(signal_hook::consts::SIGINT, a.as_raw_fd())?;
19+
signal_hook::low_level::pipe::register_raw(signal_hook::consts::SIGINT, a.try_into()?)?;
2020
println!("Waiting for Ctrl-C...");
2121

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

0 commit comments

Comments
 (0)