From 9c7c5bcb02536cabd88db8c77c984098c82e9cd5 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Wed, 1 May 2019 14:33:12 +0700 Subject: Fix some Clippy lints --- src/auth.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 040e81f..e526923 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -75,9 +75,8 @@ pub fn match_auth(basic_auth: BasicAuthParams, required_auth: &RequiredAuth) -> } /// Return `true` if hashing of `password` by `T` algorithm equals to `hash` -#[allow(clippy::ptr_arg)] -pub fn compare_hash(password: String, hash: &Vec) -> bool { - get_hash::(password) == *hash +pub fn compare_hash(password: String, hash: &[u8]) -> bool { + get_hash::(password) == hash } /// Get hash of a `text` -- cgit v1.2.3