aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-16 22:13:51 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-16 22:13:51 -0800
commitdc918ae71a5e6c78a77994d7ce106a2253918c54 (patch)
tree537c7d13443e18ed657398f4eca0bf921ef4ac5e /src/input.rs
parent3b995ff87a54239ecacb95d51f65c17504a8d22c (diff)
downloadalacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.tar.gz
alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.zip
Rustup and clippy
All of the changes in this commit are due to clippy lints.
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/input.rs b/src/input.rs
index 744a462e..3645097e 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -73,7 +73,7 @@ impl Default for Mouse {
}
}
-/// Types that are notified of escape sequences from the input::Processor.
+/// Types that are notified of escape sequences from the `input::Processor`.
pub trait Notify {
/// Notify that an escape sequence should be written to the pty
///
@@ -97,7 +97,7 @@ impl Notify for LoopNotifier {
/// Describes a state and action to take in that state
///
-/// This is the shared component of MouseBinding and KeyBinding
+/// This is the shared component of `MouseBinding` and `KeyBinding`
#[derive(Debug, Clone)]
pub struct Binding {
/// Modifier keys required to activate binding
@@ -183,15 +183,13 @@ impl Action {
match *self {
Action::Esc(ref s) => notifier.notify(s.clone().into_bytes()),
Action::Paste | Action::PasteSelection => {
- println!("paste request");
let clip = Clipboard::new().expect("get clipboard");
clip.load_selection()
.map(|contents| {
- println!("got contents");
if mode.contains(mode::BRACKETED_PASTE) {
- notifier.notify("\x1b[200~".as_bytes());
+ notifier.notify(&b"\x1b[200~"[..]);
notifier.notify(contents.into_bytes());
- notifier.notify("\x1b[201~".as_bytes());
+ notifier.notify(&b"\x1b[201~"[..]);
} else {
notifier.notify(contents.into_bytes());
}
@@ -199,8 +197,6 @@ impl Action {
.unwrap_or_else(|err| {
err_println!("Error getting clipboard contents: {}", err);
});
-
- println!("ok");
},
}
}