Rewrite Reddit post links to Libreddit equivalents

This commit is contained in:
spikecodes 2021-12-26 21:18:20 -08:00
parent 150ebe38f3
commit 7aeabfc4bc
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
10 changed files with 112 additions and 175 deletions

View file

@ -91,7 +91,7 @@ fn request(url: String, quarantine: bool) -> Boxed<Result<Response<Body>, String
.get("Location")
.map(|val| {
let new_url = val.to_str().unwrap_or_default();
format!("{}{}raw_json=1", new_url, if new_url.contains("?") { "&" } else { "?" })
format!("{}{}raw_json=1", new_url, if new_url.contains('?') { "&" } else { "?" })
})
.unwrap_or_default()
.to_string(),