Skip to content

Commit

Permalink
fix: avoid unneeded warning about corrupted version
Browse files Browse the repository at this point in the history
  • Loading branch information
Songtronix committed Mar 21, 2020
1 parent 3d31687 commit a022f1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub async fn check_win_update() -> Result<Option<String>> {
let lines = text.lines().take(2).collect::<Vec<&str>>();
let (version, url) = (
// Incase the remote version cannot be parsed we default to the current one.
Version::parse(lines[0].trim()).unwrap_or({
Version::parse(lines[0].trim()).unwrap_or_else(|_| {
log::warn!("Ignoring corrupted remote version!");
Version::parse(env!("CARGO_PKG_VERSION")).unwrap()
}),
Expand Down

0 comments on commit a022f1e

Please sign in to comment.