diff options
author | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-05-02 05:23:38 +0000 |
---|---|---|
committer | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-05-02 05:23:38 +0000 |
commit | 321b0ce7a693780830780f19de1cdec31657d2db (patch) | |
tree | d8a82998c717c4a9aa4444ae6e6da94e86fe173a /src/auth.rs | |
parent | Added rustfmt_skip directive on tests (diff) | |
download | miniserve-321b0ce7a693780830780f19de1cdec31657d2db.tar.gz miniserve-321b0ce7a693780830780f19de1cdec31657d2db.zip |
Cargo fmt
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/auth.rs b/src/auth.rs index 502c9cb..3989ab4 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -96,10 +96,14 @@ impl Middleware<crate::MiniserveConfig> for Auth { Ok(auth_req) => auth_req, Err(err) => { let auth_err = ContextualError::HTTPAuthenticationError(Box::new(err)); - return Ok(Response::Done( - HttpResponse::BadRequest() - .body(build_unauthorized_response(&req, auth_err, true, StatusCode::BAD_REQUEST)), - )); + return Ok(Response::Done(HttpResponse::BadRequest().body( + build_unauthorized_response( + &req, + auth_err, + true, + StatusCode::BAD_REQUEST, + ), + ))); } }; if !match_auth(auth_req, required_auth) { |