diff --git a/src/contrast.rs b/src/contrast.rs index c3516e9..c75cc09 100644 --- a/src/contrast.rs +++ b/src/contrast.rs @@ -1,7 +1,7 @@ +use crate::color::{lstar_from_y, y_from_lstar}; #[cfg(not(feature = "std"))] #[allow(unused_imports)] use crate::utils::no_std::FloatExt; -use crate::color::{lstar_from_y, y_from_lstar}; /// Returns a contrast ratio, which ranges from 1 to 21. /// diff --git a/src/dislike.rs b/src/dislike.rs index 36e2084..631fcb8 100644 --- a/src/dislike.rs +++ b/src/dislike.rs @@ -1,7 +1,7 @@ +use crate::hct::Hct; #[cfg(not(feature = "std"))] #[allow(unused_imports)] use crate::utils::no_std::FloatExt; -use crate::hct::Hct; pub fn is_disliked(hct: &Hct) -> bool { let (hue_passes, chroma_passes, tone_passes) = ( diff --git a/src/utils/no_std.rs b/src/utils/no_std.rs index aed3e3b..7cb4201 100644 --- a/src/utils/no_std.rs +++ b/src/utils/no_std.rs @@ -76,15 +76,15 @@ impl FloatExt for f64 { fn floor(self) -> Self { libm::floor(self) } - + fn sqrt(self) -> Self { libm::sqrt(self) } - + fn hypot(self, n: Self) -> Self { libm::hypot(self, n) } - + fn atan2(self, n: Self) -> Self { libm::atan2(self, n) }