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
+21 -25
View File
@@ -299,12 +299,7 @@ impl StochNode {
})
}
#[napi]
pub fn update(
&mut self,
high: f64,
low: f64,
close: f64,
) -> napi::Result<Option<StochValue>> {
pub fn update(&mut self, high: f64, low: f64, close: f64) -> napi::Result<Option<StochValue>> {
Ok(self
.inner
.update(cnd(high, low, close, 0.0)?)
@@ -423,19 +418,15 @@ impl AdxNode {
})
}
#[napi]
pub fn update(
&mut self,
high: f64,
low: f64,
close: f64,
) -> napi::Result<Option<AdxValue>> {
Ok(self.inner.update(cnd(high, low, close, 0.0)?).map(|o| {
AdxValue {
pub fn update(&mut self, high: f64, low: f64, close: f64) -> napi::Result<Option<AdxValue>> {
Ok(self
.inner
.update(cnd(high, low, close, 0.0)?)
.map(|o| AdxValue {
plus_di: o.plus_di,
minus_di: o.minus_di,
adx: o.adx,
}
}))
}))
}
#[napi]
pub fn batch(
@@ -728,13 +719,14 @@ impl KeltnerNode {
low: f64,
close: f64,
) -> napi::Result<Option<KeltnerValue>> {
Ok(self.inner.update(cnd(high, low, close, 0.0)?).map(|o| {
KeltnerValue {
Ok(self
.inner
.update(cnd(high, low, close, 0.0)?)
.map(|o| KeltnerValue {
upper: o.upper,
middle: o.middle,
lower: o.lower,
}
}))
}))
}
#[napi]
pub fn batch(
@@ -794,13 +786,14 @@ impl DonchianNode {
}
#[napi]
pub fn update(&mut self, high: f64, low: f64) -> napi::Result<Option<DonchianValue>> {
Ok(self.inner.update(cnd(high, low, low, 0.0)?).map(|o| {
DonchianValue {
Ok(self
.inner
.update(cnd(high, low, low, 0.0)?)
.map(|o| DonchianValue {
upper: o.upper,
middle: o.middle,
lower: o.lower,
}
}))
}))
}
#[napi]
pub fn batch(&mut self, high: Vec<f64>, low: Vec<f64>) -> napi::Result<Vec<f64>> {
@@ -968,7 +961,10 @@ impl AroonNode {
Ok(self
.inner
.update(cnd(high, low, low, 0.0)?)
.map(|o| AroonValue { up: o.up, down: o.down }))
.map(|o| AroonValue {
up: o.up,
down: o.down,
}))
}
#[napi]
pub fn batch(&mut self, high: Vec<f64>, low: Vec<f64>) -> napi::Result<Vec<f64>> {