aboutsummaryrefslogtreecommitdiff
path: root/src/display.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/display.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/display.rs')
-rw-r--r--src/display.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/display.rs b/src/display.rs
index 5ca2abb5..9227037e 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -228,7 +228,7 @@ impl Display {
})?;
let stop = init_start.elapsed();
- let stop_f = stop.as_secs() as f64 + stop.subsec_nanos() as f64 / 1_000_000_000f64;
+ let stop_f = stop.as_secs() as f64 + f64::from(stop.subsec_nanos()) / 1_000_000_000f64;
info!("Finished initializing glyph cache in {}", stop_f);
cache
@@ -238,8 +238,8 @@ impl Display {
// font metrics should be computed before creating the window in the first
// place so that a resize is not needed.
let metrics = glyph_cache.font_metrics();
- let cell_width = (metrics.average_advance + font.offset().x as f64) as u32;
- let cell_height = (metrics.line_height + font.offset().y as f64) as u32;
+ let cell_width = (metrics.average_advance + f64::from(font.offset().x)) as u32;
+ let cell_height = (metrics.line_height + f64::from(font.offset().y)) as u32;
Ok((glyph_cache, cell_width as f32, cell_height as f32))
}
@@ -252,8 +252,8 @@ impl Display {
});
let metrics = cache.font_metrics();
- self.size_info.cell_width = ((metrics.average_advance + config.font().offset().x as f64) as f32).floor();
- self.size_info.cell_height = ((metrics.line_height + config.font().offset().y as f64) as f32).floor();
+ self.size_info.cell_width = ((metrics.average_advance + f64::from(config.font().offset().x)) as f32).floor();
+ self.size_info.cell_height = ((metrics.line_height + f64::from(config.font().offset().y)) as f32).floor();
}
#[inline]