Fix new clippy warnings

This commit is contained in:
sanket1729 2022-12-01 15:59:08 -08:00
parent 3a923980e1
commit 5fc40baa73
5 changed files with 5 additions and 5 deletions

View File

@ -469,7 +469,7 @@ mod tests {
for test in tests { for test in tests {
// Hash through high-level API, check hex encoding/decoding // Hash through high-level API, check hex encoding/decoding
let hash = ripemd160::Hash::hash(&test.input.as_bytes()); let hash = ripemd160::Hash::hash(test.input.as_bytes());
assert_eq!(hash, ripemd160::Hash::from_hex(test.output_str).expect("parse hex")); assert_eq!(hash, ripemd160::Hash::from_hex(test.output_str).expect("parse hex"));
assert_eq!(&hash[..], &test.output[..]); assert_eq!(&hash[..], &test.output[..]);
assert_eq!(&hash.to_hex(), &test.output_str); assert_eq!(&hash.to_hex(), &test.output_str);

View File

@ -195,7 +195,7 @@ mod tests {
for test in tests { for test in tests {
// Hash through high-level API, check hex encoding/decoding // Hash through high-level API, check hex encoding/decoding
let hash = sha1::Hash::hash(&test.input.as_bytes()); let hash = sha1::Hash::hash(test.input.as_bytes());
assert_eq!(hash, sha1::Hash::from_hex(test.output_str).expect("parse hex")); assert_eq!(hash, sha1::Hash::from_hex(test.output_str).expect("parse hex"));
assert_eq!(&hash[..], &test.output[..]); assert_eq!(&hash[..], &test.output[..]);
assert_eq!(&hash.to_hex(), &test.output_str); assert_eq!(&hash.to_hex(), &test.output_str);

View File

@ -371,7 +371,7 @@ mod tests {
for test in tests { for test in tests {
// Hash through high-level API, check hex encoding/decoding // Hash through high-level API, check hex encoding/decoding
let hash = sha256::Hash::hash(&test.input.as_bytes()); let hash = sha256::Hash::hash(test.input.as_bytes());
assert_eq!(hash, sha256::Hash::from_hex(test.output_str).expect("parse hex")); assert_eq!(hash, sha256::Hash::from_hex(test.output_str).expect("parse hex"));
assert_eq!(&hash[..], &test.output[..]); assert_eq!(&hash[..], &test.output[..]);
assert_eq!(&hash.to_hex(), &test.output_str); assert_eq!(&hash.to_hex(), &test.output_str);

View File

@ -74,7 +74,7 @@ mod tests {
for test in tests { for test in tests {
// Hash through high-level API, check hex encoding/decoding // Hash through high-level API, check hex encoding/decoding
let hash = sha256d::Hash::hash(&test.input.as_bytes()); let hash = sha256d::Hash::hash(test.input.as_bytes());
assert_eq!(hash, sha256d::Hash::from_hex(test.output_str).expect("parse hex")); assert_eq!(hash, sha256d::Hash::from_hex(test.output_str).expect("parse hex"));
assert_eq!(&hash[..], &test.output[..]); assert_eq!(&hash[..], &test.output[..]);
assert_eq!(&hash.to_hex(), &test.output_str); assert_eq!(&hash.to_hex(), &test.output_str);

View File

@ -368,7 +368,7 @@ mod tests {
for test in tests { for test in tests {
// Hash through high-level API, check hex encoding/decoding // Hash through high-level API, check hex encoding/decoding
let hash = sha512::Hash::hash(&test.input.as_bytes()); let hash = sha512::Hash::hash(test.input.as_bytes());
assert_eq!(hash, sha512::Hash::from_hex(test.output_str).expect("parse hex")); assert_eq!(hash, sha512::Hash::from_hex(test.output_str).expect("parse hex"));
assert_eq!(&hash[..], &test.output[..]); assert_eq!(&hash[..], &test.output[..]);
assert_eq!(&hash.to_hex(), &test.output_str); assert_eq!(&hash.to_hex(), &test.output_str);