summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLibravatar Clark Moody <clark@clarkmoody.com>2020-04-01 16:17:46 -0500
committerLibravatar Clark Moody <clark@clarkmoody.com>2020-04-24 15:13:22 -0500
commit56ce01e262832b78530b0721f735a95919651d91 (patch)
tree54eb353c7af5ddcb2d94f7481b47e7283ba2b485 /core
parenta95d494f707b9492d180b41bd93565b21c729dd8 (diff)
downloadiced-56ce01e262832b78530b0721f735a95919651d91.tar.gz
iced-56ce01e262832b78530b0721f735a95919651d91.tar.bz2
iced-56ce01e262832b78530b0721f735a95919651d91.zip
Simplify range declaration
Diffstat (limited to 'core')
-rw-r--r--core/src/color.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/color.rs b/core/src/color.rs
index 57765df0..eff14948 100644
--- a/core/src/color.rs
+++ b/core/src/color.rs
@@ -42,19 +42,19 @@ impl Color {
/// New Color with range checks
pub fn new(r: f32, g: f32, b: f32, a: f32) -> Color {
debug_assert!(
- (0.0f32..=1.0f32).contains(&r),
+ (0.0..=1.0).contains(&r),
"Red component must be on [0, 1]"
);
debug_assert!(
- (0.0f32..=1.0f32).contains(&g),
+ (0.0..=1.0).contains(&g),
"Green component must be on [0, 1]"
);
debug_assert!(
- (0.0f32..=1.0f32).contains(&b),
+ (0.0..=1.0).contains(&b),
"Blue component must be on [0, 1]"
);
debug_assert!(
- (0.0f32..=1.0f32).contains(&a),
+ (0.0..=1.0).contains(&a),
"Alpha component must be on [0, 1]"
);