Skip to content

Commit e60ce03

Browse files
committed
feat: rename options
1 parent 9950a30 commit e60ce03

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

plugins/dialog/src/commands.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use tauri_plugin_fs::FsExt;
1010

1111
use crate::{
1212
Dialog, FileDialogBuilder, FilePath, MessageDialogButtons, MessageDialogKind, Result,
13-
StopAccessingPath, CANCEL, NO, OK, YES,
13+
DestroyPathOptions, CANCEL, NO, OK, YES,
1414
};
1515

1616
#[derive(Serialize)]
@@ -242,7 +242,7 @@ pub(crate) async fn save<R: Runtime>(
242242
}
243243

244244
#[command]
245-
pub fn destroy_path(_p: StopAccessingPath) -> bool {
245+
pub fn destroy_path(_p: DestroyPathOptions) -> bool {
246246
true
247247
}
248248

plugins/dialog/src/desktop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rfd::{AsyncFileDialog, AsyncMessageDialog};
1313
use serde::de::DeserializeOwned;
1414
use tauri::{plugin::PluginApi, AppHandle, Runtime};
1515

16-
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder, StopAccessingPath, OK};
16+
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder, DestroyPathOptions, OK};
1717

1818
pub fn init<R: Runtime, C: DeserializeOwned>(
1919
app: &AppHandle<R>,
@@ -209,7 +209,7 @@ pub fn save_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
209209

210210
pub fn destroy_path<R: Runtime>(
211211
_dialog: FileDialogBuilder<R>,
212-
_p: StopAccessingPath,
212+
_p: DestroyPathOptions,
213213
) -> bool {
214214
true
215215
}

plugins/dialog/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ pub(crate) struct FileDialogPayload<'a> {
339339
}
340340

341341
#[derive(Debug, Serialize, Deserialize)]
342-
pub struct StopAccessingPath {
342+
pub struct DestroyPathOptions {
343343
path: FilePath,
344344
}
345345

@@ -573,7 +573,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
573573
save_file(self, f)
574574
}
575575

576-
pub fn destroy_path(self, p: StopAccessingPath) -> bool {
576+
pub fn destroy_path(self, p: DestroyPathOptions) -> bool {
577577
destroy_path(self, p)
578578
}
579579
}
@@ -689,7 +689,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
689689
blocking_fn!(self, save_file)
690690
}
691691

692-
pub fn blocking_destroy_path(self, p: StopAccessingPath) -> bool {
692+
pub fn blocking_destroy_path(self, p: DestroyPathOptions) -> bool {
693693
self.destroy_path(p)
694694
}
695695
}

plugins/dialog/src/mobile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use tauri::{
88
AppHandle, Runtime,
99
};
1010

11-
use crate::{FileDialogBuilder, FilePath, MessageDialogBuilder, StopAccessingPath};
11+
use crate::{FileDialogBuilder, FilePath, MessageDialogBuilder, DestroyPathOptions};
1212

1313
#[cfg(target_os = "android")]
1414
const PLUGIN_IDENTIFIER: &str = "app.tauri.dialog";
@@ -106,7 +106,7 @@ pub fn save_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
106106
}
107107

108108
#[allow(unused_variables)]
109-
pub fn destroy_path<R: Runtime>(dialog: FileDialogBuilder<R>, p: StopAccessingPath) -> bool {
109+
pub fn destroy_path<R: Runtime>(dialog: FileDialogBuilder<R>, p: DestroyPathOptions) -> bool {
110110
#[cfg(target_os = "ios")]
111111
{
112112
let res = dialog

0 commit comments

Comments
 (0)