From 646742fdeac25f2b92b7295f2e6250adaf7f5c53 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Mon, 19 Dec 2022 12:49:59 +0100 Subject: Fix lints --- src/auth.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index c7d0b78..92157c9 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -114,7 +114,7 @@ mod tests { fn test_get_hash(password: &str, hash_method: &str, hash: &str) { let hash_func = get_hash_func(hash_method); let expected = hex::decode(hash).expect("Provided hash is not a valid hex code"); - let received = hash_func(&password.to_owned()); + let received = hash_func(password); assert_eq!(received, expected); } @@ -124,8 +124,8 @@ mod tests { let password = match encrypt { "plain" => Plain(password.to_owned()), - "sha256" => Sha256(get_hash::(&password.to_owned())), - "sha512" => Sha512(get_hash::(&password.to_owned())), + "sha256" => Sha256(get_hash::(password)), + "sha512" => Sha512(get_hash::(password)), _ => panic!("Unknown encryption type"), }; -- cgit v1.2.3