mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-26 21:41:48 +02:00
chore: edition 2024
This commit is contained in:
@@ -5,7 +5,7 @@ description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
repository = ""
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ use std::{
|
||||
sync::{Arc, RwLock},
|
||||
time::Duration,
|
||||
};
|
||||
pub use store::{resolve_store_path, DeserializeFn, SerializeFn, Store, StoreBuilder};
|
||||
pub use store::{DeserializeFn, SerializeFn, Store, StoreBuilder, resolve_store_path};
|
||||
use tauri::{
|
||||
plugin::{self, TauriPlugin},
|
||||
AppHandle, Manager, ResourceId, RunEvent, Runtime, State,
|
||||
plugin::{self, TauriPlugin},
|
||||
};
|
||||
|
||||
mod error;
|
||||
@@ -470,11 +470,10 @@ impl Builder {
|
||||
let collection = app_handle.state::<StoreState>();
|
||||
let stores = collection.stores.read().unwrap();
|
||||
for (path, rid) in stores.iter() {
|
||||
if let Ok(store) = app_handle.resources_table().get::<Store<R>>(*rid) {
|
||||
if let Err(err) = store.save() {
|
||||
if let Ok(store) = app_handle.resources_table().get::<Store<R>>(*rid)
|
||||
&& let Err(err) = store.save() {
|
||||
tracing::error!("failed to save store {path:?} with error {err:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -11,10 +11,10 @@ use std::{
|
||||
sync::{Arc, Mutex},
|
||||
time::Duration,
|
||||
};
|
||||
use tauri::{path::BaseDirectory, AppHandle, Emitter, Manager, Resource, ResourceId, Runtime};
|
||||
use tauri::{AppHandle, Emitter, Manager, Resource, ResourceId, Runtime, path::BaseDirectory};
|
||||
use tokio::{
|
||||
select,
|
||||
sync::mpsc::{unbounded_channel, UnboundedSender},
|
||||
sync::mpsc::{UnboundedSender, unbounded_channel},
|
||||
time::sleep,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user