Remove unnecessary explicit reference

Clippy emits various warnings of type:

  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:
Tobin C. Harding 2022-07-20 12:57:30 +10:00
parent 9f0ff6f0a4
commit 3173ef9dbb
3 changed files with 5 additions and 5 deletions

View File

@ -2033,10 +2033,10 @@ mod tests {
let json = "{\"amt\": 21000000.00000001, \
\"samt\": -21000000.00000001}";
let t: T = serde_json::from_str(&json).unwrap();
let t: T = serde_json::from_str(json).unwrap();
assert_eq!(t, orig);
let value: serde_json::Value = serde_json::from_str(&json).unwrap();
let value: serde_json::Value = serde_json::from_str(json).unwrap();
assert_eq!(t, serde_json::from_value(value).unwrap());
// errors

View File

@ -638,7 +638,7 @@ mod tests {
];
let s = Secp256k1::new();
let sk = PrivateKey::from_str(&KEY_WIF).unwrap();
let sk = PrivateKey::from_str(KEY_WIF).unwrap();
let pk = PublicKey::from_private_key(&s, &sk);
let pk_u = PublicKey {
inner: pk.inner,

View File

@ -317,7 +317,7 @@ mod tests {
let secp = secp256k1::Secp256k1::new();
let message = "rust-bitcoin MessageSignature test";
let msg_hash = super::signed_msg_hash(&message);
let msg_hash = super::signed_msg_hash(message);
let msg = secp256k1::Message::from(msg_hash);
@ -357,7 +357,7 @@ mod tests {
let secp = secp256k1::Secp256k1::new();
let message = "a different message from what was signed";
let msg_hash = super::signed_msg_hash(&message);
let msg_hash = super::signed_msg_hash(message);
// Signature of msg = "rust-bitcoin MessageSignature test"
// Signed with pk "UuOGDsfLPr4HIMKQX0ipjJeRaj1geCq3yPUF2COP5ME="