]> Untitled Git - lemmy.git/commitdiff
Fixing closures.
authorDessalines <tyhou13@gmx.com>
Tue, 21 Apr 2020 20:48:54 +0000 (16:48 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 21 Apr 2020 20:48:54 +0000 (16:48 -0400)
server/src/routes/api.rs
server/src/routes/feeds.rs
server/src/routes/nodeinfo.rs
server/src/routes/webfinger.rs

index 5ff53e2707fdc9643aeb6df55487558a9a6517bc..1565afb80c9b85eb810df89b0f60fe83587e0c52 100644 (file)
@@ -158,7 +158,7 @@ where
   let res = web::block(move || oper.perform(db.get_ref().to_owned(), Some(ws_info)))
     .await
     .map(|json| HttpResponse::Ok().json(json))
-    .map_err(|e| ErrorBadRequest(e))?;
+    .map_err(ErrorBadRequest)?;
   Ok(res)
 }
 
index b367553588572adb1b2c274889faf5b2c2c4067a..815953c55abb722a8c017aad23dc268db4b790c3 100644 (file)
@@ -39,7 +39,7 @@ async fn get_all_feed(
       .content_type("application/rss+xml")
       .body(rss)
   })
-  .map_err(|e| ErrorBadRequest(e))?;
+  .map_err(ErrorBadRequest)?;
   Ok(res)
 }
 
@@ -100,7 +100,7 @@ async fn get_feed(
       .content_type("application/rss+xml")
       .body(rss)
   })
-  .map_err(|e| ErrorBadRequest(e))?;
+  .map_err(ErrorBadRequest)?;
   Ok(res)
 }
 
index 97863271b3db06b8e37ee4f1362b3eea57d88087..9ade80283a6c8f654643e602a4d1956ca8629a65 100644 (file)
@@ -49,7 +49,7 @@ async fn node_info(
   })
   .await
   .map(|json| HttpResponse::Ok().json(json))
-  .map_err(|e| ErrorBadRequest(e))?;
+  .map_err(ErrorBadRequest)?;
   Ok(res)
 }
 
index f39c6b67bea16672ee6d684bce53cea6e190c514..eaab1cb8cff3a0e5b2743184993b932964c840e5 100644 (file)
@@ -84,6 +84,6 @@ async fn get_webfinger_response(
   })
   .await
   .map(|json| HttpResponse::Ok().json(json))
-  .map_err(|e| ErrorBadRequest(e))?;
+  .map_err(ErrorBadRequest)?;
   Ok(res)
 }