Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed May 29, 2024
1 parent 4e9f7c0 commit 3d8543c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nautilus_core/indicators/src/momentum/vhf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ impl VerticalHorizontalFilter {
let max_price = self
.prices
.iter()
.cloned()
.copied()
.fold(f64::NEG_INFINITY, f64::max);

let min_price = self.prices.iter().cloned().fold(f64::INFINITY, f64::min);
let min_price = self.prices.iter().copied().fold(f64::INFINITY, f64::min);

self.ma.update_raw(f64::abs(close - self.previous_close));
if self.initialized {
self.value = f64::abs(max_price - min_price) / self.period as f64 / self.ma.value()
self.value = f64::abs(max_price - min_price) / self.period as f64 / self.ma.value();
}
self.previous_close = close;

Expand Down

0 comments on commit 3d8543c

Please sign in to comment.