From e2b072c335354f6121a4bb346810b0e0771315e7 Mon Sep 17 00:00:00 2001 From: hatoo Date: Sat, 20 Apr 2024 15:28:35 +0900 Subject: [PATCH] fix nightly clippy --- src/monitor.rs | 4 ++-- src/printer.rs | 2 +- src/result_data.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/monitor.rs b/src/monitor.rs index 79be79c0..e8de414b 100644 --- a/src/monitor.rs +++ b/src/monitor.rs @@ -246,7 +246,7 @@ impl Monitor { .map(|r| r.duration()) .max() .map(|d| d.as_secs_f64()) - .unwrap_or(std::f64::NAN) + .unwrap_or(f64::NAN) ), Style::default().fg(colors.yellow.unwrap_or(Color::Reset)), )]), @@ -258,7 +258,7 @@ impl Monitor { .map(|r| r.duration()) .min() .map(|d| d.as_secs_f64()) - .unwrap_or(std::f64::NAN) + .unwrap_or(f64::NAN) ), Style::default().fg(colors.green.unwrap_or(Color::Reset)), )]), diff --git a/src/printer.rs b/src/printer.rs index 9fde44c2..24ffea9b 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -581,7 +581,7 @@ fn percentile_iter(values: &mut [f64]) -> impl Iterator + '_ .iter() .map(move |&p| { let i = (p / 100.0 * values.len() as f64) as usize; - (p, *values.get(i).unwrap_or(&std::f64::NAN)) + (p, *values.get(i).unwrap_or(&f64::NAN)) }) } diff --git a/src/result_data.rs b/src/result_data.rs index 39e1bd2d..a3681a2a 100644 --- a/src/result_data.rs +++ b/src/result_data.rs @@ -64,7 +64,7 @@ fn percentile_iter(values: &mut [f64]) -> impl Iterator + '_ .iter() .map(move |&p| { let i = (p / 100.0 * values.len() as f64) as usize; - (p, *values.get(i).unwrap_or(&std::f64::NAN)) + (p, *values.get(i).unwrap_or(&f64::NAN)) }) }