about summary refs log tree commit diff
path: root/src/frontend/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mod.rs')
-rw-r--r--src/frontend/mod.rs23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs
index 6194249..ce4f015 100644
--- a/src/frontend/mod.rs
+++ b/src/frontend/mod.rs
@@ -185,7 +185,9 @@ pub async fn onboarding_receiver<S: Storage>(mut req: Request<ApplicationState<S
 
     log::debug!("Creating feeds...");
     for feed in body.feeds {
-        if &feed.name == "" || &feed.slug == "" { continue };
+        if &feed.name == "" || &feed.slug == "" {
+            continue;
+        };
         log::debug!("Creating feed {} with slug {}", &feed.name, &feed.slug);
         let (_, feed) = crate::micropub::normalize_mf2(
             json!({
@@ -282,7 +284,10 @@ pub async fn mainpage<S: Storage>(mut req: Request<ApplicationState<S>>) -> Resu
                         webmention: None,
                         microsub: None,
                     },
-                    feeds: backend.get_channels(hcard_url).await.unwrap_or_else(|_| Vec::default()),
+                    feeds: backend
+                        .get_channels(hcard_url)
+                        .await
+                        .unwrap_or_else(|_| Vec::default()),
                     content: MainPage {
                         feed: &feed?,
                         card: &card?,
@@ -358,7 +363,12 @@ pub async fn render_post<S: Storage>(mut req: Request<ApplicationState<S>>) -> R
                     webmention: None,
                     microsub: None,
                 },
-                feeds: req.state().storage.get_channels(&owner).await.unwrap_or_else(|e| Vec::default()),
+                feeds: req
+                    .state()
+                    .storage
+                    .get_channels(&owner)
+                    .await
+                    .unwrap_or_else(|_| Vec::default()),
                 content: template,
             }
             .to_string(),
@@ -387,7 +397,12 @@ where
             .get_setting("site_name", &owner)
             .await
             .unwrap_or_else(|_| "Kitty Box!".to_string());
-        let feeds = request.state().storage.get_channels(&owner).await.unwrap_or_else(|_| Vec::default());
+        let feeds = request
+            .state()
+            .storage
+            .get_channels(&owner)
+            .await
+            .unwrap_or_else(|_| Vec::default());
         let mut res = next.run(request).await;
         let mut code: Option<StatusCode> = None;
         if let Some(err) = res.downcast_error::<FrontendError>() {