chore: edition 2024

This commit is contained in:
Lucas Nogueira committed 2026-09-26 15:36:22 -03:00
1 parent b517cc7e85
commit 3d8a3c877b
100 files changed
+276 -253

No files matched your search

+7 -10
View File
@@ -5,7 +5,7 @@
use std::path::PathBuf;
use serde::{Deserialize, Serialize};
use tauri::{command, Manager, Runtime, State, Window};
use tauri::{Manager, Runtime, State, Window, command};
use tauri_plugin_fs::FsExt;
use crate::{
@@ -171,14 +171,13 @@ pub(crate) async fn open<R: Runtime>(
)
} else {
let folder = dialog_builder.blocking_pick_folder();
if let Some(folder) = &folder {
if let Ok(path) = folder.clone().into_path() {
if let Some(folder) = &folder
&& let Ok(path) = folder.clone().into_path() {
if let Some(s) = window.try_fs_scope() {
s.allow_directory(&path, options.recursive)?;
}
tauri_scope.allow_directory(&path, options.directory)?;
}
}
OpenResponse::Folder(folder.map(|p| p.simplified()))
}
}
@@ -204,14 +203,13 @@ pub(crate) async fn open<R: Runtime>(
let tauri_scope = window.state::<tauri::scope::Scopes>();
let file = dialog_builder.blocking_pick_file();
if let Some(file) = &file {
if let Ok(path) = file.clone().into_path() {
if let Some(file) = &file
&& let Ok(path) = file.clone().into_path() {
if let Some(s) = window.try_fs_scope() {
s.allow_file(&path)?;
}
tauri_scope.allow_file(&path)?;
}
}
OpenResponse::File(file.map(|f| f.simplified()))
};
Ok(res)
@@ -246,14 +244,13 @@ pub(crate) async fn save<R: Runtime>(
let tauri_scope = window.state::<tauri::scope::Scopes>();
let path = dialog_builder.blocking_save_file();
if let Some(p) = &path {
if let Ok(path) = p.clone().into_path() {
if let Some(p) = &path
&& let Ok(path) = p.clone().into_path() {
if let Some(s) = window.try_fs_scope() {
s.allow_file(&path)?;
}
tauri_scope.allow_file(&path)?;
}
}
Ok(path.map(|p| p.simplified()))
}