From cb55bf4012a0a43efe9dd436c079924acdcd0c1c Mon Sep 17 00:00:00 2001 From: Lucio Franco Date: Wed, 13 Mar 2019 14:56:25 -0400 Subject: [PATCH] signal: Fix deprecated use of `Handle::current` (#981) --- tokio-signal/src/lib.rs | 2 +- tokio-signal/src/unix.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-signal/src/lib.rs b/tokio-signal/src/lib.rs index 3f4ca383a..d80010740 100644 --- a/tokio-signal/src/lib.rs +++ b/tokio-signal/src/lib.rs @@ -102,7 +102,7 @@ pub type IoStream = Box + Send>; /// read up on the documentation in the `unix` or `windows` module to take a /// peek. pub fn ctrl_c() -> IoFuture> { - ctrl_c_handle(&Handle::current()) + ctrl_c_handle(&Handle::default()) } /// Creates a stream which receives "ctrl-c" notifications sent to a process. diff --git a/tokio-signal/src/unix.rs b/tokio-signal/src/unix.rs index 8487a114d..b7c67f9a5 100644 --- a/tokio-signal/src/unix.rs +++ b/tokio-signal/src/unix.rs @@ -351,7 +351,7 @@ impl Signal { /// * If the signal is one of /// [`signal_hook::FORBIDDEN`](https://docs.rs/signal-hook/*/signal_hook/fn.register.html#panics) pub fn new(signal: c_int) -> IoFuture { - Signal::with_handle(signal, &Handle::current()) + Signal::with_handle(signal, &Handle::default()) } /// Creates a new stream which will receive notifications when the current