fix(store): adjust `load` and `save` implementation

pull/340/head^2
Lucas Nogueira 2 years ago
parent dabacbe644
commit 9244d4ee8f
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -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");

Loading…
Cancel
Save