Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiving committed Jul 29, 2024
1 parent 6023bfa commit 7014e9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/contrast.rs
Original file line number Diff line number Diff line change
@@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion src/dislike.rs
Original file line number Diff line number Diff line change
@@ -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) = (
Expand Down
6 changes: 3 additions & 3 deletions src/utils/no_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 7014e9c

Please sign in to comment.