Apply suggestions from code review

Co-authored-by: seth <getchoo@tuta.io>
Signed-off-by: maskers <97827489+maskersss@users.noreply.github.com>
This commit is contained in:
maskers 2024-08-05 01:52:06 +03:00 committed by GitHub
parent 889debc18d
commit 438a49466c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -225,21 +225,20 @@ async fn outdated_launcher(log: &str, data: &Data) -> Result<Issue> {
|| (log_version_parts[0] == latest_version_parts[0]
&& log_version_parts[1] < latest_version_parts[1])
{
if log_version_parts[0] < 8 {
let issue = (
let issue = if log_version_parts[0] < 8 {
(
"Outdated Prism Launcher".to_string(),
format!("Your installed version is {log_version}, while the newest version is {latest_version}.\nPlease update; for more info see https://prismlauncher.org/download/")
);
)
Ok(Some(issue))
} else {
let issue = (
(
"Outdated Prism Launcher".to_string(),
format!("Your installed version is {log_version}, while the newest version is {latest_version}.\nPlease update by pressing the `Update` button in the launcher or using your package manager.")
);
Ok(Some(issue))
}
)
};
Ok(Some(issue))
} else {
Ok(None)
}