mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-05-01 12:08:06 +02:00
fix(store): adjust load and save implementation
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user