Fix clippy errors

This commit is contained in:
spikecodes 2021-03-26 20:00:47 -07:00
parent 14f9ac4ca7
commit 66ac72beab
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
8 changed files with 32 additions and 37 deletions

View file

@ -23,7 +23,7 @@ pub async fn profile(req: Request<Body>) -> Result<Response<Body>, String> {
// Build the Reddit JSON API path
let path = format!(
"/user/{}.json?{}&raw_json=1",
req.param("name").unwrap_or("reddit".to_string()),
req.param("name").unwrap_or_else(|| "reddit".to_string()),
req.uri().query().unwrap_or_default()
);