From 24919153dd100ce81e510539c2cd67a120ac9649 Mon Sep 17 00:00:00 2001 From: kingchenc Date: Sat, 23 May 2026 23:44:16 +0200 Subject: [PATCH] style(bollinger): wrap naive helper assert to satisfy rustfmt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit aa2846c collapsed the multi-line assert in the test-only naive helper to a single line to drop the cold expression-arg lines that Codecov saw as uncovered. The single-line form exceeded the 100-col limit, so cargo fmt --check failed on every supported toolchain in CI (ubuntu-latest, macos-latest, windows-latest). Let rustfmt wrap it back to the three-line form. The arms are still just a literal expression and a static-string message — no expression format args — so the cold-path lines that Codecov originally flagged on line 179 stay covered. No behaviour change. --- crates/wickra-core/src/indicators/bollinger.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/wickra-core/src/indicators/bollinger.rs b/crates/wickra-core/src/indicators/bollinger.rs index afc237a8..8a8825a7 100644 --- a/crates/wickra-core/src/indicators/bollinger.rs +++ b/crates/wickra-core/src/indicators/bollinger.rs @@ -173,7 +173,10 @@ mod tests { use approx::assert_relative_eq; fn naive(prices: &[f64], period: usize, mult: f64) -> BollingerOutput { - assert!(prices.len() >= period, "naive requires at least `period` prices"); + assert!( + prices.len() >= period, + "naive requires at least `period` prices" + ); let w = &prices[prices.len() - period..]; let mean = w.iter().sum::() / period as f64; let var = w.iter().map(|x| (x - mean).powi(2)).sum::() / period as f64;