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:
@@ -17,13 +17,13 @@ use aho_corasick::AhoCorasick;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use tauri::{
|
||||
plugin::{Builder, TauriPlugin},
|
||||
Manager, Runtime,
|
||||
plugin::{Builder, TauriPlugin},
|
||||
};
|
||||
use tauri_plugin_fs::FsExt;
|
||||
|
||||
use std::{
|
||||
fs::{create_dir_all, File},
|
||||
fs::{File, create_dir_all},
|
||||
io::Write,
|
||||
path::Path,
|
||||
};
|
||||
@@ -198,8 +198,8 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
// We will still save some semi-broken values because the scope events are quite spammy and we don't want to reduce runtime performance any further.
|
||||
let ac = AhoCorasick::new(PATTERNS).unwrap(/* This should be impossible to fail since we're using a small static input */);
|
||||
|
||||
if let Some(fs_scope) = &fs_scope {
|
||||
if fs_scope_state_path.exists() {
|
||||
if let Some(fs_scope) = &fs_scope
|
||||
&& fs_scope_state_path.exists() {
|
||||
let scope: Scope = std::fs::read(&fs_scope_state_path)
|
||||
.map_err(Error::from)
|
||||
.and_then(|scope| bincode::deserialize(&scope).map_err(Into::into))
|
||||
@@ -218,7 +218,6 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
// This is needed to fix broken .peristed-scope files in case the app doesn't update the scope itself.
|
||||
save_scopes(fs_scope, &app_dir, &fs_scope_state_path);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "protocol-asset")]
|
||||
if asset_scope_state_path.exists() {
|
||||
|
||||
Reference in New Issue
Block a user