aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index cb0abb14..a8e18451 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -15,6 +15,7 @@
//! Alacritty - The GPU Enhanced Terminal
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
+#![cfg_attr(feature = "clippy", deny(clippy))]
#![cfg_attr(feature = "clippy", deny(enum_glob_use))]
#![cfg_attr(feature = "clippy", deny(if_not_else))]
#![cfg_attr(feature = "clippy", deny(wrong_pub_self_convention))]
@@ -82,7 +83,7 @@ use std::ops::Mul;
pub use grid::Grid;
pub use term::Term;
-/// Facade around [winit's MouseCursor](glutin::MouseCursor)
+/// Facade around [winit's `MouseCursor`](glutin::MouseCursor)
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
pub enum MouseCursor {
Arrow,
@@ -102,9 +103,9 @@ impl Mul<f32> for Rgb {
fn mul(self, rhs: f32) -> Rgb {
let result = Rgb {
- r: (self.r as f32 * rhs).max(0.0).min(255.0) as u8,
- g: (self.g as f32 * rhs).max(0.0).min(255.0) as u8,
- b: (self.b as f32 * rhs).max(0.0).min(255.0) as u8
+ r: (f32::from(self.r) * rhs).max(0.0).min(255.0) as u8,
+ g: (f32::from(self.g) * rhs).max(0.0).min(255.0) as u8,
+ b: (f32::from(self.b) * rhs).max(0.0).min(255.0) as u8
};
trace!("Scaling RGB by {} from {:?} to {:?}", rhs, self, result);