diff options
author | Joe Wilm <joe@jwilm.com> | 2016-09-25 19:33:51 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-09-25 19:33:51 -0700 |
commit | 6a5ac20defa558309a674e069f33febde1824c00 (patch) | |
tree | 29c9144eb72b11cda867e9a221102622c70559cf /src/input.rs | |
parent | 4a679d711fbb1969af8b957ee40877067527b8b8 (diff) | |
download | r-alacritty-6a5ac20defa558309a674e069f33febde1824c00.tar.gz r-alacritty-6a5ac20defa558309a674e069f33febde1824c00.tar.bz2 r-alacritty-6a5ac20defa558309a674e069f33febde1824c00.zip |
Resolve compiler warnings
Diffstat (limited to 'src/input.rs')
-rw-r--r-- | src/input.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/input.rs b/src/input.rs index 829312e7..b2263d6e 100644 --- a/src/input.rs +++ b/src/input.rs @@ -24,7 +24,6 @@ //! //! TODO handling xmodmap would be good use std::borrow::Cow; -use std::io::Write; use glutin::{ElementState, VirtualKeyCode}; use glutin::{Mods, mods}; @@ -48,18 +47,6 @@ pub trait Notify { fn notify<B: Into<Cow<'static, [u8]>>>(&mut self, B); } -/// A notifier type that simply writes bytes to the provided `Write` type -pub struct WriteNotifier<'a, W: Write + 'a>(pub &'a mut W); - -impl<'a, W: Write> Notify for WriteNotifier<'a, W> { - fn notify<B>(&mut self, bytes: B) - where B: Into<Cow<'static, [u8]>> - { - let message = bytes.into(); - self.0.write_all(&message[..]).unwrap(); - } -} - pub struct LoopNotifier(pub ::mio::channel::Sender<::EventLoopMessage>); impl Notify for LoopNotifier { |