remove unessecary compilation attributes

pull/2322/head
mo0nbase 6 months ago
parent 3578fed258
commit e5479decfa
No known key found for this signature in database
GPG Key ID: 3BAB6FEAAFF4E694

@ -16,9 +16,7 @@ use crate::{
#[derive(Serialize)]
#[serde(untagged)]
pub enum OpenResponse {
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
Folders(Option<Vec<FilePath>>),
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
Folder(Option<FilePath>),
Files(Option<Vec<FilePath>>),
File(Option<FilePath>),
@ -133,7 +131,6 @@ pub(crate) async fn open<R: Runtime>(
}
if options.directory {
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
{
let tauri_scope = window.state::<tauri::scope::Scopes>();

@ -506,7 +506,6 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// Ok(())
/// });
/// ```
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
pub fn pick_folder<F: FnOnce(Option<FilePath>) + Send + 'static>(self, f: F) {
pick_folder(self, f)
}
@ -528,7 +527,6 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// Ok(())
/// });
/// ```
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
pub fn pick_folders<F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(self, f: F) {
pick_folders(self, f)
}
@ -611,7 +609,6 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// // the folder path is `None` if the user closed the dialog
/// }
/// ```
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
pub fn blocking_pick_folder(self) -> Option<FilePath> {
blocking_fn!(self, pick_folder)
}
@ -631,7 +628,6 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// // the folder paths value is `None` if the user closed the dialog
/// }
/// ```
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
pub fn blocking_pick_folders(self) -> Option<Vec<FilePath>> {
blocking_fn!(self, pick_folders)
}

Loading…
Cancel
Save