Skip to content

Commit

Permalink
Fix nightly lint
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienG2 committed Oct 22, 2024
1 parent 4283dfa commit 791e3e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,10 @@ mod tests {
.map(|i| (i as f64 / 256.0) + 0.5)
.collect::<Vec<_>>();
let expected = dataset.iter().copied().product::<f64>();
let assert_close = |result: f64| Ok(prop_assert!((result - expected).abs() < 1e-6 * expected.abs()));
let assert_close = |result: f64| {
prop_assert!((result - expected).abs() < 1e-6 * expected.abs());
Ok(())
};
assert_close(dataset.iter().copied().product_ilp::<1, f64>())?;
assert_close(dataset.iter().copied().product_ilp::<2, f64>())?;
assert_close(dataset.iter().copied().product_ilp::<3, f64>())?;
Expand Down

0 comments on commit 791e3e3

Please sign in to comment.