mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-15 16:00:38 +08:00
lib: Fix clippy warning
This commit is contained in:
+2
-4
@@ -172,10 +172,8 @@ pub fn events() -> mpsc::UnboundedReceiver<Event> {
|
||||
let stdin = io::stdin();
|
||||
for key in stdin.keys().flatten() {
|
||||
// TODO(erikli): Remove this hack! Perhaps use `tokio::CancellationToken`?
|
||||
if start.elapsed().as_millis() > 200 {
|
||||
if events_tx.send(Event::Key(key)).is_err() {
|
||||
return;
|
||||
}
|
||||
if start.elapsed().as_millis() > 200 && events_tx.send(Event::Key(key)).is_err() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user