Update rust toolchain to 1.80 #180

Merged
wojtek merged 6 commits from 179---update-rust-toolchain-to-1.80-in-ci into main 2024-08-24 15:10:54 +02:00
3 changed files with 2 additions and 8 deletions
Showing only changes of commit 1753203c7d - Show all commits

View File

@ -1,4 +1,4 @@
use crossterm::event::{KeyEvent, MouseEvent};
use crossterm::event::KeyEvent;
use std::fmt;
use std::sync::mpsc;
@ -36,8 +36,6 @@ impl From<mpsc::RecvError> for EventError {
#[derive(Clone, Copy, Debug)]
pub enum Event {
Key(KeyEvent),
Mouse(MouseEvent),
Resize(u16, u16),
}
pub struct EventChannel {

View File

@ -41,8 +41,6 @@ impl<APP: IAppInteract> IEventHandler<APP> for EventHandler {
fn handle_next_event(&self, mut app: APP) -> Result<APP, EventError> {
match self.events.recv()? {
Event::Key(key_event) => app = Self::handle_key_event(app, key_event),
Event::Mouse(_) => {}
Event::Resize(_, _) => {}
};
Ok(app)
}

View File

@ -33,9 +33,7 @@ impl IEventListener for EventListener {
Ok(event) => {
if let Err(err) = match event {
CrosstermEvent::Key(e) => self.events.send(Event::Key(e)),
CrosstermEvent::Mouse(e) => self.events.send(Event::Mouse(e)),
CrosstermEvent::Resize(w, h) => self.events.send(Event::Resize(w, h)),
_ => unimplemented!(),
_ => Ok(()),
} {
return err;
}