From a00cb152244e4b4a44d9e4bb99273c2a17b44b16 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 8 Oct 2024 10:22:58 +0800 Subject: [PATCH] Rename inner store's inset method to set --- plugins/store/src/store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/store/src/store.rs b/plugins/store/src/store.rs index cc11f283..82075961 100644 --- a/plugins/store/src/store.rs +++ b/plugins/store/src/store.rs @@ -344,7 +344,7 @@ impl StoreInner { } /// Inserts a key-value pair into the store. - pub fn insert(&mut self, key: impl Into, value: impl Into) { + pub fn set(&mut self, key: impl Into, value: impl Into) { let key = key.into(); let value = value.into(); self.cache.insert(key.clone(), value.clone()); @@ -479,7 +479,7 @@ impl Store { /// Inserts a key-value pair into the store. pub fn set(&self, key: impl Into, value: impl Into) { - self.store.lock().unwrap().insert(key.into(), value.into()); + self.store.lock().unwrap().set(key.into(), value.into()); let _ = self.trigger_auto_save(); }