Reformat code
This commit is contained in:
12
src/event.rs
12
src/event.rs
@@ -1,8 +1,8 @@
|
||||
use futures::FutureExt;
|
||||
use color_eyre::eyre::{Result, eyre};
|
||||
use std::time::Duration;
|
||||
use color_eyre::eyre::{eyre, Result};
|
||||
use crossterm::event::EventStream;
|
||||
use futures::FutureExt;
|
||||
use futures::StreamExt;
|
||||
use std::time::Duration;
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
use tokio::task::JoinHandle;
|
||||
|
||||
@@ -16,7 +16,7 @@ pub(crate) enum AppEvent {
|
||||
pub(crate) struct EventHandler {
|
||||
_tx: UnboundedSender<AppEvent>,
|
||||
rx: tokio::sync::mpsc::UnboundedReceiver<AppEvent>,
|
||||
pub task: JoinHandle<()>
|
||||
pub task: JoinHandle<()>,
|
||||
}
|
||||
|
||||
impl EventHandler {
|
||||
@@ -45,9 +45,7 @@ impl EventHandler {
|
||||
}
|
||||
}
|
||||
});
|
||||
Self {
|
||||
_tx, rx, task
|
||||
}
|
||||
Self { _tx, rx, task }
|
||||
}
|
||||
|
||||
pub(crate) async fn next(&mut self) -> Result<AppEvent> {
|
||||
|
||||
Reference in New Issue
Block a user