about summary refs log tree commit diff
path: root/src/micropub/mod.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2025-01-01 05:57:47 +0300
committerVika <vika@fireburn.ru>2025-01-01 07:08:33 +0300
commitfc925564cc2324b1343da721b1e8aab680292ac9 (patch)
tree2619934c146f236ac377f91a44faccbe3abaa904 /src/micropub/mod.rs
parent5ad8443c8d6d9ed3f9d28ac52af529ceb41d741f (diff)
downloadkittybox-fc925564cc2324b1343da721b1e8aab680292ac9.tar.zst
Partially appease clippy
Some false positives on `serde(rename)` remain, as well as lints still
requiring my attention.

Change-Id: I3166771af20b2d07c6226b3b1a9d15fe36152356
Diffstat (limited to 'src/micropub/mod.rs')
-rw-r--r--src/micropub/mod.rs8
1 files changed, 2 insertions, 6 deletions
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<D: Storage, A: AuthBackend>(
                 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.",