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

@ -506,7 +506,6 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// Ok(()) /// Ok(())
/// }); /// });
/// ``` /// ```
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
pub fn pick_folder<F: FnOnce(Option<FilePath>) + Send + 'static>(self, f: F) { pub fn pick_folder<F: FnOnce(Option<FilePath>) + Send + 'static>(self, f: F) {
pick_folder(self, f) pick_folder(self, f)
} }
@ -528,7 +527,6 @@ impl<R: Runtime> FileDialogBuilder<R> {
/// Ok(()) /// Ok(())
/// }); /// });
/// ``` /// ```
#[cfg(any(desktop, target_os = "ios", target_os = "android"))]
pub fn pick_folders<F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(self, f: F) { pub fn pick_folders<F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(self, f: F) {
pick_folders(self, 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 /// // 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> { pub fn blocking_pick_folder(self) -> Option<FilePath> {
blocking_fn!(self, pick_folder) 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 /// // 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>> { pub fn blocking_pick_folders(self) -> Option<Vec<FilePath>> {
blocking_fn!(self, pick_folders) blocking_fn!(self, pick_folders)
} }

Loading…
Cancel
Save