diff options
author | Joe Wilm <joe@jwilm.com> | 2016-09-25 19:49:44 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-09-25 19:49:44 -0700 |
commit | 3f6deb8e2ffa22403aca9fcf6b50bdccc75dc3cf (patch) | |
tree | dc8ea717e13921d6f66e2389b4b12bcb5e339e6a /src/input.rs | |
parent | 6a5ac20defa558309a674e069f33febde1824c00 (diff) | |
download | alacritty-3f6deb8e2ffa22403aca9fcf6b50bdccc75dc3cf.tar.gz alacritty-3f6deb8e2ffa22403aca9fcf6b50bdccc75dc3cf.zip |
Refactor EventLoop into event_loop module
This type and its implementations were seriously cluttering main.rs.
Diffstat (limited to 'src/input.rs')
-rw-r--r-- | src/input.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs index b2263d6e..0251b5f8 100644 --- a/src/input.rs +++ b/src/input.rs @@ -29,6 +29,7 @@ use glutin::{ElementState, VirtualKeyCode}; use glutin::{Mods, mods}; use term::mode::{self, TermMode}; +use event_loop; /// Processes input from glutin. /// @@ -47,14 +48,14 @@ pub trait Notify { fn notify<B: Into<Cow<'static, [u8]>>>(&mut self, B); } -pub struct LoopNotifier(pub ::mio::channel::Sender<::EventLoopMessage>); +pub struct LoopNotifier(pub ::mio::channel::Sender<event_loop::Msg>); impl Notify for LoopNotifier { fn notify<B>(&mut self, bytes: B) where B: Into<Cow<'static, [u8]>> { let bytes = bytes.into(); - match self.0.send(::EventLoopMessage::Input(bytes)) { + match self.0.send(event_loop::Msg::Input(bytes)) { Ok(_) => (), Err(_) => panic!("expected send event loop msg"), } |