From 96d0f4def040df5bf2bf5cd824de136a746050bf Mon Sep 17 00:00:00 2001 From: taovonqi Date: Tue, 19 Dec 2023 12:52:33 +0200 Subject: [PATCH 1/2] Fixes unhandled zero volume --- src/indicators/ease_of_movement.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/indicators/ease_of_movement.rs b/src/indicators/ease_of_movement.rs index 2079913..5000b2d 100644 --- a/src/indicators/ease_of_movement.rs +++ b/src/indicators/ease_of_movement.rs @@ -122,7 +122,12 @@ impl IndicatorInstance for EaseOfMovementInstance Date: Thu, 25 Jul 2024 19:10:36 +0300 Subject: [PATCH 2/2] Fix warnings. --- src/core/indicator/result.rs | 2 +- src/methods/past.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/indicator/result.rs b/src/core/indicator/result.rs index 1bab58a..0878cc3 100644 --- a/src/core/indicator/result.rs +++ b/src/core/indicator/result.rs @@ -113,7 +113,7 @@ impl fmt::Debug for IndicatorResult { .signals .iter() .take(self.length.1 as usize) - .map(std::string::ToString::to_string) + .map(ToString::to_string) .collect(); write!( f, diff --git a/src/methods/past.rs b/src/methods/past.rs index 03ceeeb..cff5c5d 100644 --- a/src/methods/past.rs +++ b/src/methods/past.rs @@ -91,7 +91,7 @@ where } } -impl Buffered<::Output> for Past { +impl Buffered<::Output> for Past { fn get(&self, index: usize) -> Option<::Output> { let index = index.try_into().ok()?; self.0.get(index).cloned()