cargo fmt

This commit is contained in:
realaravinth 2021-06-30 20:14:15 +05:30
parent 9f940c317a
commit c05888d648
No known key found for this signature in database
GPG Key ID: AD9F0F08E855ED88
4 changed files with 7 additions and 9 deletions

View File

@ -161,8 +161,7 @@ mod tests {
#[test] #[test]
fn feature() { fn feature() {
actix_rt::System::new() actix_rt::System::new().block_on(async move { get_pow_config_works().await });
.block_on(async move { get_pow_config_works().await });
} }
async fn get_pow_config_works() { async fn get_pow_config_works() {

View File

@ -62,9 +62,9 @@ pub fn handle_embedded_file(path: &str) -> HttpResponse {
Cow::Owned(bytes) => bytes.into(), Cow::Owned(bytes) => bytes.into(),
}; };
HttpResponse::Ok() HttpResponse::Ok()
.insert_header(header::CacheControl(vec![header::CacheDirective::MaxAge( .insert_header(header::CacheControl(vec![
CACHE_AGE, header::CacheDirective::MaxAge(CACHE_AGE),
)])) ]))
.content_type(from_path(path).first_or_octet_stream().as_ref()) .content_type(from_path(path).first_or_octet_stream().as_ref())
.body(body) .body(body)
} }

View File

@ -54,7 +54,6 @@ mod tests {
let (data, _, signin_resp) = register_and_signin(NAME, EMAIL, PASSWORD).await; let (data, _, signin_resp) = register_and_signin(NAME, EMAIL, PASSWORD).await;
let cookies = get_cookie!(signin_resp); let cookies = get_cookie!(signin_resp);
let mut app = get_app!(data).await; let mut app = get_app!(data).await;
let urls = vec![ let urls = vec![

View File

@ -82,9 +82,9 @@ fn handle_widget_assets(path: &str) -> HttpResponse {
}; };
HttpResponse::Ok() HttpResponse::Ok()
.insert_header(header::CacheControl(vec![header::CacheDirective::MaxAge( .insert_header(header::CacheControl(vec![
crate::CACHE_AGE, header::CacheDirective::MaxAge(crate::CACHE_AGE),
)])) ]))
.content_type(from_path(path).first_or_octet_stream().as_ref()) .content_type(from_path(path).first_or_octet_stream().as_ref())
.body(body) .body(body)
} }