From 949a961c19ba994c3f0846e7b54d9a55a94d7b9a Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 29 Jul 2021 18:14:30 +0300 Subject: Appease rustfmt, clippy and cargo check --- src/micropub/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/micropub/mod.rs') diff --git a/src/micropub/mod.rs b/src/micropub/mod.rs index 84b9083..23f20c4 100644 --- a/src/micropub/mod.rs +++ b/src/micropub/mod.rs @@ -7,17 +7,21 @@ pub use post::post_handler; pub struct CORSMiddleware {} -use async_trait::async_trait; -use tide::{Next, Request, Result}; use crate::database; use crate::ApplicationState; +use async_trait::async_trait; +use tide::{Next, Request, Result}; #[async_trait] impl tide::Middleware> for CORSMiddleware where B: database::Storage + Send + Sync + Clone, { - async fn handle(&self, req: Request>, next: Next<'_, ApplicationState>) -> Result { + async fn handle( + &self, + req: Request>, + next: Next<'_, ApplicationState>, + ) -> Result { let mut res = next.run(req).await; res.insert_header("Access-Control-Allow-Origin", "*"); -- cgit 1.4.1