This commit is contained in:
Jun Kurihara 2022-07-22 22:28:26 +09:00
commit 45895ca7bc
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
12 changed files with 36 additions and 151 deletions

View file

@ -6,9 +6,7 @@ use hyper::{Body, Request, Response, StatusCode, Uri};
// Functions to create response (error or redirect)
pub(super) fn http_error(status_code: StatusCode) -> Result<Response<Body>> {
let response = Response::builder()
.status(status_code)
.body(Body::empty())?;
let response = Response::builder().status(status_code).body(Body::empty())?;
Ok(response)
}