From c05888d648b799bda8f77b59d03230f6c4a17c8f Mon Sep 17 00:00:00 2001 From: realaravinth Date: Wed, 30 Jun 2021 20:14:15 +0530 Subject: [PATCH] cargo fmt --- src/api/v1/pow/get_config.rs | 3 +-- src/docs.rs | 6 +++--- src/pages/mod.rs | 1 - src/widget/mod.rs | 6 +++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/api/v1/pow/get_config.rs b/src/api/v1/pow/get_config.rs index cc95f39a..9c657e95 100644 --- a/src/api/v1/pow/get_config.rs +++ b/src/api/v1/pow/get_config.rs @@ -161,8 +161,7 @@ mod tests { #[test] fn feature() { - actix_rt::System::new() - .block_on(async move { get_pow_config_works().await }); + actix_rt::System::new().block_on(async move { get_pow_config_works().await }); } async fn get_pow_config_works() { diff --git a/src/docs.rs b/src/docs.rs index d0f6f13b..c9e1afa1 100644 --- a/src/docs.rs +++ b/src/docs.rs @@ -62,9 +62,9 @@ pub fn handle_embedded_file(path: &str) -> HttpResponse { Cow::Owned(bytes) => bytes.into(), }; HttpResponse::Ok() - .insert_header(header::CacheControl(vec![header::CacheDirective::MaxAge( - CACHE_AGE, - )])) + .insert_header(header::CacheControl(vec![ + header::CacheDirective::MaxAge(CACHE_AGE), + ])) .content_type(from_path(path).first_or_octet_stream().as_ref()) .body(body) } diff --git a/src/pages/mod.rs b/src/pages/mod.rs index 9e7d64c8..2e57b2a5 100644 --- a/src/pages/mod.rs +++ b/src/pages/mod.rs @@ -54,7 +54,6 @@ mod tests { let (data, _, signin_resp) = register_and_signin(NAME, EMAIL, PASSWORD).await; let cookies = get_cookie!(signin_resp); - let mut app = get_app!(data).await; let urls = vec![ diff --git a/src/widget/mod.rs b/src/widget/mod.rs index be29db48..ce81ab74 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -82,9 +82,9 @@ fn handle_widget_assets(path: &str) -> HttpResponse { }; HttpResponse::Ok() - .insert_header(header::CacheControl(vec![header::CacheDirective::MaxAge( - crate::CACHE_AGE, - )])) + .insert_header(header::CacheControl(vec![ + header::CacheDirective::MaxAge(crate::CACHE_AGE), + ])) .content_type(from_path(path).first_or_octet_stream().as_ref()) .body(body) }