Remove the unnecessary explicit reference
Clippy emits various warnings of form: warning: this expression creates a reference which is immediately dereferenced by the compiler As suggested, remove the unnecessary explicit reference.
This commit is contained in:
parent
9266b1bbe0
commit
5e67f7a7cb
|
@ -469,7 +469,7 @@ mod tests {
|
|||
|
||||
for test in tests {
|
||||
// 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[..], &test.output[..]);
|
||||
assert_eq!(&hash.to_hex(), &test.output_str);
|
||||
|
|
|
@ -195,7 +195,7 @@ mod tests {
|
|||
|
||||
for test in tests {
|
||||
// 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[..], &test.output[..]);
|
||||
assert_eq!(&hash.to_hex(), &test.output_str);
|
||||
|
|
|
@ -371,7 +371,7 @@ mod tests {
|
|||
|
||||
for test in tests {
|
||||
// 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[..], &test.output[..]);
|
||||
assert_eq!(&hash.to_hex(), &test.output_str);
|
||||
|
|
|
@ -74,7 +74,7 @@ mod tests {
|
|||
|
||||
for test in tests {
|
||||
// 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[..], &test.output[..]);
|
||||
assert_eq!(&hash.to_hex(), &test.output_str);
|
||||
|
|
|
@ -368,7 +368,7 @@ mod tests {
|
|||
|
||||
for test in tests {
|
||||
// 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[..], &test.output[..]);
|
||||
assert_eq!(&hash.to_hex(), &test.output_str);
|
||||
|
|
Loading…
Reference in New Issue