From f83994a2fa90b4268ed87727a01a189b769fb693 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 16 Feb 2022 09:01:41 -0500 Subject: [PATCH] simplify cache logic --- src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5503e67..5499ffb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -171,10 +171,8 @@ impl ChartManager { self.use_back_cache = !underlying_update && self.resolution == resolution && self.back_cache.is_some(); - self.use_front_cache = match underlying_update { - true => false, - false => num_interval == self.num_interval && self.front_cache.is_some(), - }; + self.use_front_cache = + !underlying_update && num_interval == self.num_interval && self.front_cache.is_some(); self.func_str = func_str.to_string(); self.min_x = min_x;