From d42f4817e0540f11220eb8894f61e7225ceec7c4 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 4 Dec 2023 18:41:02 +0900 Subject: [PATCH] cargo fmt Signed-off-by: Hector Martin --- src/types.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/types.rs b/src/types.rs index ac32cfc..7d71b0a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -368,10 +368,10 @@ impl Speaker { * data. */ if pwr_avg < -0.01 { - panic!( - "{}: Negative power, bad ivsense data? ({})", - self.name, pwr_avg - ); + panic!( + "{}: Negative power, bad ivsense data? ({})", + self.name, pwr_avg + ); } let pwr_avg = pwr_avg.max(0.0); @@ -386,8 +386,7 @@ impl Speaker { let temp = s.t_coil_hyst.max(s.t_magnet_hyst); - let reduction = - (temp - (self.t_limit - self.g.t_window)) / self.g.t_window; + let reduction = (temp - (self.t_limit - self.g.t_window)) / self.g.t_window; let gain = s.min_gain * reduction.max(0.); s.gain = gain;