From ba42fc066fd6d0d1caeb92efdfa67ddf72f1e62a Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Wed, 19 May 2021 20:30:10 -0700 Subject: [PATCH] Fix two subscription bugs --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/settings.rs | 2 +- src/subreddit.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c116352..9541173 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -609,7 +609,7 @@ checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" [[package]] name = "libreddit" -version = "0.14.2" +version = "0.14.3" dependencies = [ "askama", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index 3073429..46f13dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "libreddit" description = " Alternative private front-end to Reddit" license = "AGPL-3.0" repository = "https://github.com/spikecodes/libreddit" -version = "0.14.2" +version = "0.14.3" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2018" diff --git a/src/settings.rs b/src/settings.rs index 7676049..3e80e9c 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -103,7 +103,7 @@ fn set_cookies_method(req: Request, remove_cookies: bool) -> Response res.insert_cookie( Cookie::build(name.to_owned(), value.to_owned()) diff --git a/src/subreddit.rs b/src/subreddit.rs index 192daed..3909451 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -199,7 +199,7 @@ pub async fn subscriptions(req: Request) -> Result, String> sub_list.sort_by_key(|a| a.to_lowercase()) } else if action.contains(&"unsubscribe".to_string()) { // Remove sub name from subscribed list - sub_list.retain(|s| s != part); + sub_list.retain(|s| s.to_lowercase() != part.to_lowercase()); } }