Skip to content

Commit

Permalink
fix: clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
amv-dev committed Jan 23, 2022
1 parent 2094470 commit fa77258
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/methods/collapse_timeframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl Method for CollapseTimeframe {
#[cfg(test)]
mod tests {
use super::{Candle, CollapseTimeframe as TestingMethod, Method, OHLCV};
use crate::core::ValueType;
use crate::helpers::{assert_eq_float, RandomCandles};

#[test]
Expand All @@ -122,11 +123,11 @@ mod tests {
high: window
.iter()
.map(OHLCV::high)
.fold(first.high(), |a, b| a.max(b)),
.fold(first.high(), ValueType::max),
low: window
.iter()
.map(OHLCV::low)
.fold(first.low(), |a, b| a.min(b)),
.fold(first.low(), ValueType::min),
close: window.last().map(OHLCV::close).unwrap(),
volume: window.iter().map(OHLCV::volume).sum(),
}
Expand Down

0 comments on commit fa77258

Please sign in to comment.