chore: apply rustfmt to binding/core sources and sync Cargo.lock

Normalises whitespace in sources committed earlier in this branch
before rustfmt was run over them (Node/WASM bindings, and three core
indicator test modules), and records the wasm-bindgen-test dependency
tree added in B6 into Cargo.lock. No functional change; cargo fmt --all
--check is now clean.
This commit is contained in:
kingchenc
2026-05-22 04:14:18 +02:00
parent 41d52ec5be
commit 59c435fbd5
6 changed files with 127 additions and 30 deletions
@@ -251,6 +251,10 @@ mod tests {
assert_eq!(bb.update(f64::INFINITY).unwrap(), last);
// The window still holds 1..=5, so a real input slides it to 2..=6.
let after = bb.update(6.0).unwrap();
assert_relative_eq!(after.middle, (2.0 + 3.0 + 4.0 + 5.0 + 6.0) / 5.0, epsilon = 1e-12);
assert_relative_eq!(
after.middle,
(2.0 + 3.0 + 4.0 + 5.0 + 6.0) / 5.0,
epsilon = 1e-12
);
}
}
+4 -1
View File
@@ -205,7 +205,10 @@ mod tests {
assert_relative_eq!(o.upper, m + 2.0 * av, epsilon = 1e-9);
assert_relative_eq!(o.lower, m - 2.0 * av, epsilon = 1e-9);
}
_ => assert!(got.is_none(), "Keltner must be None until both ready (i={i})"),
_ => assert!(
got.is_none(),
"Keltner must be None until both ready (i={i})"
),
}
}
}
+4 -1
View File
@@ -180,7 +180,10 @@ mod tests {
for (i, v) in out.iter().enumerate().take(5) {
assert!(v.is_none(), "candle index {i} must be None during warmup");
}
assert!(out[5].is_some(), "first MFI value lands at index period (5)");
assert!(
out[5].is_some(),
"first MFI value lands at index period (5)"
);
assert_eq!(mfi.warmup_period(), 6);
}