mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-17 00:00:11 +02:00
signal: Fix deprecated use of Handle::current (#981)
This commit is contained in:
committed by
Carl Lerche
parent
987ccfc8ac
commit
cb55bf4012
@@ -102,7 +102,7 @@ pub type IoStream<T> = Box<Stream<Item = T, Error = io::Error> + Send>;
|
||||
/// read up on the documentation in the `unix` or `windows` module to take a
|
||||
/// peek.
|
||||
pub fn ctrl_c() -> IoFuture<IoStream<()>> {
|
||||
ctrl_c_handle(&Handle::current())
|
||||
ctrl_c_handle(&Handle::default())
|
||||
}
|
||||
|
||||
/// Creates a stream which receives "ctrl-c" notifications sent to a process.
|
||||
|
||||
@@ -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> {
|
||||
Signal::with_handle(signal, &Handle::current())
|
||||
Signal::with_handle(signal, &Handle::default())
|
||||
}
|
||||
|
||||
/// Creates a new stream which will receive notifications when the current
|
||||
|
||||
Reference in New Issue
Block a user