fix(store): adjust load and save implementation

This commit is contained in:
Lucas Nogueira
2023-05-02 13:46:56 -03:00
parent dabacbe644
commit 9244d4ee8f
+6 -4
View File
@@ -175,8 +175,9 @@ pub struct Store<R: Runtime> {
impl<R: Runtime> Store<R> {
/// Update the store from the on-disk state
pub fn load<R: Runtime>(&mut self, app: &AppHandle<R>) -> 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<R: Runtime> Store<R> {
}
/// Saves the store to disk
pub fn save<R: Runtime>(&self, app: &AppHandle<R>) -> 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");