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

@@ -2,9 +2,10 @@ mod main_view;
use crossterm::event::{Event, KeyEvent};
pub use main_view::MainView;
use std::any::Any;
pub trait View {
pub trait View: Any + 'static {
fn handle_input(&mut self, event: &Event) -> color_eyre::Result<()>;
fn handle_key_input(&mut self, key: &KeyEvent) -> color_eyre::Result<()>;
fn is_running(&self) -> bool;
}
}