aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorkhai96_ <hvksmr1996@gmail.com>2019-05-02 13:27:43 +0000
committerkhai96_ <hvksmr1996@gmail.com>2019-05-02 13:27:43 +0000
commit63f71088d45cb5d4d7a075d1fee79d1f2b881117 (patch)
tree44d9eb34926922f786e67de3b62a98012e010304 /src/auth.rs
parentMove 'rust: {stable,beta}' to 'matrix.includes' (diff)
parentFix some Clippy lints (diff)
downloadminiserve-63f71088d45cb5d4d7a075d1fee79d1f2b881117.tar.gz
miniserve-63f71088d45cb5d4d7a075d1fee79d1f2b881117.zip
Merge branch 'clippy' into new-clippy
Diffstat (limited to '')
-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`