mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
signal: change unix::Signal to return () instead of signum (#1330)
* This simplifies the API surface by returning () instead of the signal number that was used during registration. This also more closely mirrors the cross-platform `CtrlC` event stream API * This is a **breaking change**
This commit is contained in:
@@ -20,12 +20,8 @@ mod platform {
|
||||
|
||||
// Up until now, we haven't really DONE anything, just prepared
|
||||
// our futures, now it's time to actually await the results!
|
||||
while let Some(the_signal) = stream.next().await {
|
||||
println!(
|
||||
"*Got signal {:#x}* I should probably reload my config \
|
||||
or something",
|
||||
the_signal
|
||||
);
|
||||
while let Some(_) = stream.next().await {
|
||||
println!("*Got signal* I should probably reload my config or something");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user