From 0e1b2ea6b10af9bbe8800dbda7d37f6932d06939 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 10 May 2022 10:36:13 +0200 Subject: [PATCH] Remove implied StatusCode::OK --- crates/handlers/src/oauth2/token.rs | 2 +- crates/static-files/src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/handlers/src/oauth2/token.rs b/crates/handlers/src/oauth2/token.rs index 2e4876f0..ce5dcd74 100644 --- a/crates/handlers/src/oauth2/token.rs +++ b/crates/handlers/src/oauth2/token.rs @@ -192,7 +192,7 @@ pub(crate) async fn post( headers.typed_insert(CacheControl::new().with_no_store()); headers.typed_insert(Pragma::no_cache()); - Ok((StatusCode::OK, headers, Json(reply))) + Ok((headers, Json(reply))) } fn hash(mut hasher: H, token: &str) -> anyhow::Result { diff --git a/crates/static-files/src/lib.rs b/crates/static-files/src/lib.rs index b1f9ff52..ea770ce5 100644 --- a/crates/static-files/src/lib.rs +++ b/crates/static-files/src/lib.rs @@ -70,7 +70,6 @@ mod builtin { let res = if is_head { ( - StatusCode::OK, TypedHeader(ContentType::from(mime)), TypedHeader(ContentLength(len)), TypedHeader(etag), @@ -78,7 +77,6 @@ mod builtin { .into_response() } else { ( - StatusCode::OK, TypedHeader(ContentType::from(mime)), TypedHeader(ContentLength(len)), TypedHeader(etag),