aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-01-06 01:42:55 +0000
committerGitHub <noreply@github.com>2018-01-06 01:42:55 +0000
commit2920cbe7103f03a45080bfb7610bd7f481f36361 (patch)
tree4839deca8a54d8e2546d124eb26178fd1eac4d4a /src/event.rs
parent650b5a0cbaccc6de2b53240372c2be79739d5d12 (diff)
downloadalacritty-2920cbe7103f03a45080bfb7610bd7f481f36361.tar.gz
alacritty-2920cbe7103f03a45080bfb7610bd7f481f36361.zip
Add clippy check to travis
This commit adds clippy as a required step of the build process. To make this possible, all existing clippy issues have been resolved.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/event.rs b/src/event.rs
index 3dce4d66..b133f8fa 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -56,8 +56,8 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> {
}
fn copy_selection(&self, buffer: ::copypasta::Buffer) {
- if let &mut Some(ref selection) = self.selection {
- selection.to_span(self.terminal as &Term)
+ if let Some(ref selection) = *self.selection {
+ selection.to_span(self.terminal)
.map(|span| {
let buf = self.terminal.string_from_selection(&span);
if !buf.is_empty() {
@@ -79,7 +79,7 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> {
fn update_selection(&mut self, point: Point, side: Side) {
self.selection_modified = true;
// Update selection if one exists
- if let &mut Some(ref mut selection) = self.selection {
+ if let Some(ref mut selection) = *self.selection {
selection.update(point, side);
return;
}
@@ -94,7 +94,7 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> {
}
fn semantic_selection(&mut self, point: Point) {
- *self.selection = Some(Selection::semantic(point, self.terminal as &Term));
+ *self.selection = Some(Selection::semantic(point, self.terminal));
self.selection_modified = true;
}
@@ -255,8 +255,7 @@ impl<N: Notify> Processor<N> {
) {
match event {
// Pass on device events
- Event::DeviceEvent { .. } => (),
- Event::Suspended { .. } => (),
+ Event::DeviceEvent { .. } | Event::Suspended { .. } => (),
Event::WindowEvent { event, .. } => {
use glutin::WindowEvent::*;
match event {