Reformat code

This commit is contained in:
2025-10-15 21:57:33 +08:00
parent a776e55187
commit d033d8b93f
19 changed files with 206 additions and 194 deletions

View File

@@ -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> {