Skip to content

Commit 3d63f7f

Browse files
committed
Cleanup crossterm declarations
1 parent 172cc18 commit 3d63f7f

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod key_event;
1717
mod standard_event;
1818
mod thread;
1919

20-
pub(crate) use crossterm::event::{KeyCode, KeyModifiers, MouseEvent, MouseEventKind};
20+
pub(crate) use crossterm::event::{KeyCode, KeyEventKind, KeyModifiers, MouseEvent, MouseEventKind};
2121

2222
pub(crate) use self::{
2323
event::Event,

src/input/event.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
use crossterm::event::{KeyCode, MouseEvent};
2-
3-
use crate::input::{KeyEvent, StandardEvent};
1+
use crate::input::{KeyCode, KeyEvent, MouseEvent, StandardEvent};
42

53
/// An event, either from an input device, system change or action event.
64
#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Copy)]

src/input/event_provider.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ use std::time::Duration;
33
use anyhow::{anyhow, Result};
44
#[cfg(not(test))]
55
use crossterm::event::{poll, read};
6-
use crossterm::event::{Event, KeyEvent, KeyEventKind, MouseEvent, MouseEventKind};
6+
use crossterm::event::{Event, KeyEvent};
77
#[cfg(test)]
88
use read_event_mocks::{poll, read};
99

10-
/// Function that returns a event
10+
use crate::input::{KeyEventKind, MouseEvent, MouseEventKind};
11+
12+
/// Function that returns an event
1113
pub(crate) trait EventReaderFn: Fn() -> Result<Option<Event>> + Send + Sync + 'static {}
1214

1315
impl<FN: Fn() -> Result<Option<Event>> + Send + Sync + 'static> EventReaderFn for FN {}

src/input/key_event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crossterm::event::{KeyCode, KeyModifiers};
1+
use crate::input::{KeyCode, KeyModifiers};
22

33
/// Represents a key event.
44
#[derive(Debug, PartialOrd, PartialEq, Eq, Clone, Copy)]

src/input/thread.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,10 @@ where EventProvider: EventReaderFn
9191
#[cfg(test)]
9292
mod tests {
9393
use anyhow::anyhow;
94-
use crossterm::event::{KeyCode, KeyModifiers};
9594

9695
use super::*;
9796
use crate::{
98-
input::KeyEvent,
97+
input::{KeyCode, KeyEvent, KeyModifiers},
9998
runtime::Status,
10099
test_helpers::{create_event_reader, testers},
101100
};

0 commit comments

Comments
 (0)