From 0f805d80ea250cf3b17dd391fe45f5dd740eac84 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 20 Oct 2018 21:11:12 +0100 Subject: [PATCH] Allow condition cache to be cleared --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 95e6519..4f7ea42 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -108,6 +108,12 @@ impl State { .collect(); self } + + pub fn clear_condition_cache( + &mut self, + ) -> Result<(), PoisonError>>> { + self.condition_cache.write().map(|mut c| c.clear()) + } } /// Compound conditions joined by 'or'