Skip to content
Myr

Fix clippy errors

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 1aefe14 · Browse files · 2 files+11 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+11 added−7 removed

  • other:+11 added−7 removed

2 files+11 added−7 removed

modified:src/hyperfine/timer/unix_timer.rs+2 added-2 removed
80 unmodified lines
81 system_usec: 70000,82 };8384 let t_zero = cpu_time_interval(&t_a, &t_a);85 assert_eq!(0.0, t_zero.user);86 assert_eq!(0.0, t_zero.system);85 assert!(t_zero.user.abs() < f64::EPSILON);86 assert!(t_zero.system.abs() < f64::EPSILON);8788 let t_ab = cpu_time_interval(&t_a, &t_b);89 assert_relative_eq!(0.007655, t_ab.user);90 assert_relative_eq!(0.015679, t_ab.system);
5 unmodified lines
modified:src/hyperfine/internal.rs+9 added-5 removed
134 unmodified lines
135}136137#[test]138fn test_max() {139 let assert_float_eq = |a, b| {140 assert!((a - b) < f64::EPSILON);141 };142139 assert_eq!(1.0, max(&[1.0]));140 assert_eq!(-1.0, max(&[-1.0]));141 assert_eq!(-1.0, max(&[-2.0, -1.0]));142 assert_eq!(1.0, max(&[-1.0, 1.0]));143 assert_eq!(1.0, max(&[-1.0, 1.0, 0.0]));143 assert_float_eq(1.0, max(&[1.0]));144 assert_float_eq(-1.0, max(&[-1.0]));145 assert_float_eq(-1.0, max(&[-2.0, -1.0]));146 assert_float_eq(1.0, max(&[-1.0, 1.0]));147 assert_float_eq(1.0, max(&[-1.0, 1.0, 0.0]));148}149150#[cfg(test)]151fn create_result(name: &str, mean: Scalar) -> BenchmarkResult {
103 unmodified lines