From fc925564cc2324b1343da721b1e8aab680292ac9 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 1 Jan 2025 05:57:47 +0300 Subject: Partially appease clippy Some false positives on `serde(rename)` remain, as well as lints still requiring my attention. Change-Id: I3166771af20b2d07c6226b3b1a9d15fe36152356 --- src/micropub/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/micropub/mod.rs') diff --git a/src/micropub/mod.rs b/src/micropub/mod.rs index f5cb5b9..621d4f9 100644 --- a/src/micropub/mod.rs +++ b/src/micropub/mod.rs @@ -370,7 +370,7 @@ impl MicropubUpdate { } } if let Some(replace) = &self.replace { - if replace.iter().map(|(k, v)| k.as_str()).any(|k| { + if replace.iter().map(|(k, _)| k.as_str()).any(|k| { k.to_lowercase().as_str() == "uid" }) { return Err(MicropubError::from_static( @@ -671,11 +671,7 @@ pub(crate) async fn query( Some(url) => { match db.get_post(&url).await { Ok(some) => match some { - Some(post) => { - let mut response = axum::response::Json(&post).into_response(); - - response - }, + Some(post) => axum::response::Json(&post).into_response(), None => MicropubError::from_static( ErrorKind::NotFound, "The specified MF2 object was not found in database.", -- cgit 1.4.1