From a017fbc71ddb02eec87e6b2573113a04f8d372e3 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 5 Feb 2022 14:55:28 -0300 Subject: [PATCH] fix(core): regression on dialog and updater feature flag usage --- core/tauri/Cargo.toml | 2 +- core/tauri/src/api/dialog.rs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 48f872c8b..99af5c61f 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -111,7 +111,7 @@ compression = [ "tauri-macros/compression", "tauri-utils/compression" ] wry = ["tauri-runtime-wry"] isolation = ["tauri-utils/isolation", "tauri-macros/isolation"] custom-protocol = ["tauri-macros/custom-protocol"] -updater = ["minisign-verify", "base64", "dialog-ask"] +updater = ["minisign-verify", "base64", "http-api", "dialog-ask"] http-api = ["attohttpc"] reqwest-client = ["reqwest", "bytes"] command = ["shared_child", "os_pipe"] diff --git a/core/tauri/src/api/dialog.rs b/core/tauri/src/api/dialog.rs index e76bf008c..2d6fa1c28 100644 --- a/core/tauri/src/api/dialog.rs +++ b/core/tauri/src/api/dialog.rs @@ -49,11 +49,9 @@ macro_rules! file_dialog_builder { /// The file dialog builder. /// /// Constructs file picker dialogs that can select single/multiple files or directories. - #[cfg(any(dialog_open, dialog_save))] #[derive(Debug, Default)] pub struct FileDialogBuilder(rfd::FileDialog); - #[cfg(any(dialog_open, dialog_save))] impl FileDialogBuilder { /// Gets the default file dialog builder. pub fn new() -> Self { @@ -107,7 +105,6 @@ macro_rules! file_dialog_builder { /// Examples of main thread context are the [`tauri::App::run`] closure and non-async commmands. pub mod blocking { use crate::{Runtime, Window}; - #[cfg(any(dialog_open, dialog_save))] use std::path::{Path, PathBuf}; use std::sync::mpsc::sync_channel; @@ -282,7 +279,6 @@ pub mod blocking { mod nonblocking { use crate::{Runtime, Window}; - #[cfg(any(dialog_open, dialog_save))] use std::path::{Path, PathBuf}; file_dialog_builder!();