far better, renamed evenhandler to even reader in tui
This commit is contained in:
15
client/src/tui/terminal/event_reader.rs
Normal file
15
client/src/tui/terminal/event_reader.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
// src/tui/terminal/event_reader.rs
|
||||
|
||||
use crossterm::event::{self, Event};
|
||||
|
||||
pub struct EventReader;
|
||||
|
||||
impl EventReader {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
pub fn read_event(&self) -> Result<Event, Box<dyn std::error::Error>> {
|
||||
Ok(event::read()?)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user