diff options
author | jikstra <jikstra@disroot.org> | 2021-09-02 13:50:35 +0000 |
---|---|---|
committer | jikstra <jikstra@disroot.org> | 2021-09-02 13:50:35 +0000 |
commit | 680b0d001d58a32b0caac3263103dbd9ddb5fe84 (patch) | |
tree | 3441b50bee478341d803ed9b311e9f9d76113a3a /src/auth.rs | |
parent | Fix tests (diff) | |
download | miniserve-680b0d001d58a32b0caac3263103dbd9ddb5fe84.tar.gz miniserve-680b0d001d58a32b0caac3263103dbd9ddb5fe84.zip |
cargo fmt & cargo clippy
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auth.rs b/src/auth.rs index efdeefb..82b407c 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -90,10 +90,10 @@ fn handle_auth(req: &HttpRequest) -> Result<(), ContextualError> { Ok(cred) => match match_auth(&cred, required_auth) { true => { req.extensions_mut().insert(CurrentUser { - name: cred.username + name: cred.username, }); Ok(()) - }, + } false => Err(ContextualError::InvalidHttpCredentials), }, Err(_) => Err(ContextualError::RequireHttpCredentials), |