From 06f39586afde4d6d45d02c6e9b3341fb8782b469 Mon Sep 17 00:00:00 2001 From: afa Date: Sun, 2 Apr 2023 17:37:29 +0800 Subject: [PATCH] fix(store): Load state from disk and extend defaults, fixes #296 (#295) * fix(store): Load state from disk and extend defaults, fixes #296 * fmt --- plugins/store/src/store.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/store/src/store.rs b/plugins/store/src/store.rs index 5ca2f8e9a..17ad48cf3 100644 --- a/plugins/store/src/store.rs +++ b/plugins/store/src/store.rs @@ -185,7 +185,8 @@ impl Store { let bytes = read(store_path)?; - self.cache = (self.deserialize)(&bytes).map_err(Error::Deserialize)?; + self.cache + .extend((self.deserialize)(&bytes).map_err(Error::Deserialize)?); Ok(()) }