From 378d4a904fbec7e45395abd409a898106e11bef8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 18 Jul 2022 07:56:32 +0000 Subject: fix(main.rs): trim version for compare and display --- Cargo.toml | 2 +- src/main.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6c8ee2e..a6e119b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "sydney" -version = "0.1.6" +version = "0.1.7" authors = ["Fuwn "] edition = "2021" description = "Vim-like, Command-line Gemini Client" diff --git a/src/main.rs b/src/main.rs index 507c790..ab628f8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,6 +84,8 @@ Report bugs to https://github.com/gemrest/sydney/issues"#, ) { Ok(response) => if let Some(content) = response.content() { + let content = content.trim(); + if content > &String::from(env!("CARGO_PKG_VERSION")) { app.error = Some(format!( "Your Sydney version ({}) is outdated. It is recommended that you \ -- cgit v1.2.3