aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-03-12 22:49:46 +0000
committerGitHub <noreply@github.com>2020-03-12 22:49:46 +0000
commit6d60a49956facc63ab5e0ebac8eb15ab7347ea9a (patch)
tree0f9a38a42c5da8f083b7d7dcfd9b912177fe465a /alacritty/src/input.rs
parentc2e39085e3dfed6e4ea69ea30ed85dae1d81823c (diff)
downloadr-alacritty-6d60a49956facc63ab5e0ebac8eb15ab7347ea9a.tar.gz
r-alacritty-6d60a49956facc63ab5e0ebac8eb15ab7347ea9a.tar.bz2
r-alacritty-6d60a49956facc63ab5e0ebac8eb15ab7347ea9a.zip
Run clippy on oldest supported version
Since there were some problems with clippy suggesting changes that were not yet available in the oldest supported Rust compiler of Alacritty, the clippy stage has been moved from stable to 1.37.0.
Diffstat (limited to 'alacritty/src/input.rs')
-rw-r--r--alacritty/src/input.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 01adedbc..844710d7 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -469,7 +469,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
match delta {
MouseScrollDelta::LineDelta(_columns, lines) => {
let new_scroll_px = lines * self.ctx.size_info().cell_height;
- self.scroll_terminal(new_scroll_px as f64);
+ self.scroll_terminal(f64::from(new_scroll_px));
},
MouseScrollDelta::PixelDelta(lpos) => {
match phase {
@@ -487,7 +487,7 @@ impl<'a, T: EventListener, A: ActionContext<T>> Processor<'a, T, A> {
}
fn scroll_terminal(&mut self, new_scroll_px: f64) {
- let height = self.ctx.size_info().cell_height as f64;
+ let height = f64::from(self.ctx.size_info().cell_height);
if self.ctx.terminal().mode().intersects(TermMode::MOUSE_MODE) {
self.ctx.mouse_mut().scroll_px += new_scroll_px;