From b678bff339ede90f13be91c0f9065254bffb353e Mon Sep 17 00:00:00 2001 From: Ed B Date: Sat, 16 Mar 2024 21:20:56 +0200 Subject: [PATCH 1/2] bug(app): unused variable \'res\' when building wiht no-self-update --- src/gui/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/mod.rs b/src/gui/mod.rs index 873fed3..fccf193 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -267,10 +267,10 @@ impl Application for UadGui { UadListState::Done, )))) } + #[cfg(feature = "self-update")] Message::_NewReleaseDownloaded(res) => { debug!("UAD-ng update has been download!"); - #[cfg(feature = "self-update")] if let Ok((relaunch_path, cleanup_path)) = res { // Remove first arg, which is path to binary. We don't use this first // arg as binary path because it's not reliable, per the docs. From f83987f1f22a9e52561dd7456d7c7b92ea964042 Mon Sep 17 00:00:00 2001 From: Ed B Date: Sat, 16 Mar 2024 21:31:54 +0200 Subject: [PATCH 2/2] bug(app): unused variable \'res\' when building wiht no-self-update - fixed issues when feature: no-self-update flag was passed --- src/gui/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/mod.rs b/src/gui/mod.rs index fccf193..f7b768c 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -21,7 +21,9 @@ use iced::{ window::Settings as Window, Alignment, Application, Command, Element, Length, Renderer, Settings, }; -use std::{env, path::PathBuf}; +use std::env; +#[cfg(feature = "self-update")] +use std::path::PathBuf; #[cfg(feature = "self-update")] use crate::core::update::{bin_name, download_update_to_temp_file, remove_file}; @@ -65,6 +67,7 @@ pub enum Message { RefreshButtonPressed, RebootButtonPressed, LoadDevices(Vec), + #[cfg(feature = "self-update")] _NewReleaseDownloaded(Result<(PathBuf, PathBuf), ()>), GetLatestRelease(Result, ()>), FontLoaded(Result<(), iced::font::Error>),