chore: edition 2024

This commit is contained in:
Lucas Nogueira
2026-09-26 15:36:22 -03:00
parent b517cc7e85
commit 3d8a3c877b
100 changed files with 276 additions and 253 deletions
+4 -5
View File
@@ -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() {