From 9244d4ee8f840865556fe77bcda1b80a74513f56 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 2 May 2023 13:46:56 -0300 Subject: [PATCH] fix(store): adjust `load` and `save` implementation --- plugins/store/src/store.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/store/src/store.rs b/plugins/store/src/store.rs index f8ba51a9..004b05b9 100644 --- a/plugins/store/src/store.rs +++ b/plugins/store/src/store.rs @@ -175,8 +175,9 @@ pub struct Store { impl Store { /// Update the store from the on-disk state - pub fn load(&mut self, app: &AppHandle) -> Result<(), Error> { - let app_dir = app + pub fn load(&mut self) -> Result<(), Error> { + let app_dir = self + .app .path() .app_data_dir() .expect("failed to resolve app dir"); @@ -191,8 +192,9 @@ impl Store { } /// Saves the store to disk - pub fn save(&self, app: &AppHandle) -> Result<(), Error> { - let app_dir = app + pub fn save(&self) -> Result<(), Error> { + let app_dir = self + .app .path() .app_data_dir() .expect("failed to resolve app dir");