1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

#![allow(clippy::float_cmp)] everywhere

it has always been an annoyance, never a help
This commit is contained in:
Emil Ernerfeldt
2021-05-09 14:00:53 +02:00
parent 6ad6f56cb1
commit fb5176c133
14 changed files with 7 additions and 24 deletions

View File

@@ -414,7 +414,6 @@ pub fn linear_u8_from_linear_f32(a: f32) -> u8 {
#[test]
pub fn test_srgba_conversion() {
#![allow(clippy::float_cmp)]
for b in 0..=255 {
let l = linear_f32_from_gamma_u8(b);
assert!(0.0 <= l && l <= 1.0);
@@ -613,7 +612,6 @@ impl From<Color32> for Hsva {
/// All ranges in 0-1, rgb is linear.
pub fn hsv_from_rgb([r, g, b]: [f32; 3]) -> (f32, f32, f32) {
#![allow(clippy::float_cmp)]
#![allow(clippy::many_single_char_names)]
let min = r.min(g.min(b));
let max = r.max(g.max(b)); // value

View File

@@ -53,6 +53,7 @@
nonstandard_style,
rust_2018_idioms
)]
#![allow(clippy::float_cmp)]
#![allow(clippy::manual_range_contains)]
pub mod color;