From f935455cd8081e799cfee6dbd290c40a74915a76 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Wed, 10 May 2023 04:05:52 +0300 Subject: [PATCH] remove leftover updater structs --- core/tauri/build.rs | 1 - core/tauri/src/app.rs | 4 ---- core/tauri/src/lib.rs | 41 +---------------------------------------- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/core/tauri/build.rs b/core/tauri/build.rs index 3522c9ffc..e94b08a3c 100644 --- a/core/tauri/build.rs +++ b/core/tauri/build.rs @@ -46,7 +46,6 @@ fn alias(alias: &str, has_feature: bool) { fn main() { alias("custom_protocol", has_feature("custom-protocol")); alias("dev", !has_feature("custom-protocol")); - alias("updater", has_feature("updater")); let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); let mobile = target_os == "ios" || target_os == "android"; diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 2f9d5ec26..a69d8c29c 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -174,10 +174,6 @@ pub enum RunEvent { /// /// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop. MainEventsCleared, - /// Updater event. - #[cfg(updater)] - #[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] - Updater(crate::UpdaterEvent), } impl From for RunEvent { diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 490ee104b..aeaed62c9 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -269,48 +269,9 @@ pub fn log_stdout() { }); } -/// Updater events. -#[cfg(updater)] -#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] -#[derive(Debug, Clone)] -pub enum UpdaterEvent { - /// An update is available. - UpdateAvailable { - /// The update body. - body: String, - /// The update release date. - date: Option, - /// The update version. - version: String, - }, - /// The update is pending and about to be downloaded. - Pending, - /// The update download received a progress event. - DownloadProgress { - /// The amount that was downloaded on this iteration. - /// Does not accumulate with previous chunks. - chunk_length: usize, - /// The total - content_length: Option, - }, - /// The update has been downloaded and is now about to be installed. - Downloaded, - /// The update has been applied and the app is now up to date. - Updated, - /// The app is already up to date. - AlreadyUpToDate, - /// An error occurred while updating. - Error(String), -} - /// The user event type. #[derive(Debug, Clone)] -pub enum EventLoopMessage { - /// Updater event. - #[cfg(updater)] - #[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] - Updater(UpdaterEvent), -} +pub enum EventLoopMessage {} /// The webview runtime interface. A wrapper around [`runtime::Runtime`] with the proper user event type associated. pub trait Runtime: runtime::Runtime {}