Skip to content

Commit

Permalink
Less obtuse way to get a NAN (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter authored Mar 20, 2024
1 parent 866e14b commit abc7ab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fidget/src/core/eval/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ macro_rules! declare_canonical_binary_full {
};
}

#[allow(non_camel_case_types)]
#[allow(non_camel_case_types, clippy::useless_conversion)]
pub mod canonical {
use super::*;

Expand Down Expand Up @@ -191,15 +191,15 @@ pub mod canonical {
declare_canonical_binary!(
Context::min,
|a, b| if a.is_nan() || b.is_nan() {
a * b // get a NAN
f32::NAN.into()
} else {
a.min(b)
}
);
declare_canonical_binary!(
Context::max,
|a, b| if a.is_nan() || b.is_nan() {
a * b // get a NAN
f32::NAN.into()
} else {
a.max(b)
}
Expand Down

0 comments on commit abc7ab0

Please sign in to comment.