aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2019-05-02 23:04:07 +0000
committerGitHub <noreply@github.com>2019-05-02 23:04:07 +0000
commitc0ef2fbf569047185ea472702523d7c1b54c030a (patch)
tree478ff421f74e21d26f8e18ec8f030f84ce57a183 /src/auth.rs
parentAdd note about empty arrays (diff)
parentMerge branch 'new-clippy-experiment' into new-clippy (diff)
downloadminiserve-c0ef2fbf569047185ea472702523d7c1b54c030a.tar.gz
miniserve-c0ef2fbf569047185ea472702523d7c1b54c030a.zip
Merge pull request #99 from KSXGitHub/new-clippy
A better Clippy integration
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auth.rs b/src/auth.rs
index 8e6532b..e526923 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -75,8 +75,8 @@ pub fn match_auth(basic_auth: BasicAuthParams, required_auth: &RequiredAuth) ->
}
/// Return `true` if hashing of `password` by `T` algorithm equals to `hash`
-pub fn compare_hash<T: Digest>(password: String, hash: &Vec<u8>) -> bool {
- get_hash::<T>(password) == *hash
+pub fn compare_hash<T: Digest>(password: String, hash: &[u8]) -> bool {
+ get_hash::<T>(password) == hash
}
/// Get hash of a `text`