From f929fecb7319c4526b2760500df0d3c6308464ea Mon Sep 17 00:00:00 2001 From: rasul Date: Fri, 24 Apr 2020 16:38:39 -0500 Subject: [PATCH] don't use 'string' as a name --- src/hash.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hash.rs b/src/hash.rs index 5867f49..3886937 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -19,8 +19,8 @@ use sha2::{Digest, Sha512}; /// println!("{}", hash(data, salt)); /// ``` pub fn hash, S: Into>(data: D, salt: S) -> String { - let string = salt.into() + &data.into(); - let hash = Sha512::digest(string.as_bytes()); + let s = salt.into() + &data.into(); + let hash = Sha512::digest(s.as_bytes()); hash.iter().map(|b| format!("{:02x}", b)).collect() }