mirror of https://github.com/smol-rs/polling
tests: Fix clippy error in wait-signal
Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
cf25dd85f8
commit
ae484a0a12
|
@ -27,24 +27,18 @@ mod example {
|
|||
|
||||
println!("Press Ctrl+C to exit...");
|
||||
|
||||
loop {
|
||||
// Wait for events.
|
||||
poller.wait(&mut events, None).unwrap();
|
||||
|
||||
// Process events.
|
||||
for ev in events.iter() {
|
||||
let ev = events.iter().next().unwrap();
|
||||
match ev.key {
|
||||
1 => {
|
||||
println!("SIGINT received");
|
||||
return;
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
events.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
|
|
Loading…
Reference in New Issue