Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): unused variable 'res' when building with no-self-update #344

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -65,6 +67,7 @@ pub enum Message {
RefreshButtonPressed,
RebootButtonPressed,
LoadDevices(Vec<Phone>),
#[cfg(feature = "self-update")]
_NewReleaseDownloaded(Result<(PathBuf, PathBuf), ()>),
GetLatestRelease(Result<Option<Release>, ()>),
FontLoaded(Result<(), iced::font::Error>),
Expand Down Expand Up @@ -267,10 +270,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.
Expand Down