mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-06-14 02:06:37 +00:00
cargo fmt
This commit is contained in:
parent
9f940c317a
commit
c05888d648
@ -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() {
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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![
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user