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:
parent
9f0ff6f0a4
commit
3173ef9dbb
|
@ -2033,10 +2033,10 @@ mod tests {
|
||||||
|
|
||||||
let json = "{\"amt\": 21000000.00000001, \
|
let json = "{\"amt\": 21000000.00000001, \
|
||||||
\"samt\": -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);
|
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());
|
assert_eq!(t, serde_json::from_value(value).unwrap());
|
||||||
|
|
||||||
// errors
|
// errors
|
||||||
|
|
|
@ -638,7 +638,7 @@ mod tests {
|
||||||
];
|
];
|
||||||
|
|
||||||
let s = Secp256k1::new();
|
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 = PublicKey::from_private_key(&s, &sk);
|
||||||
let pk_u = PublicKey {
|
let pk_u = PublicKey {
|
||||||
inner: pk.inner,
|
inner: pk.inner,
|
||||||
|
|
|
@ -317,7 +317,7 @@ mod tests {
|
||||||
|
|
||||||
let secp = secp256k1::Secp256k1::new();
|
let secp = secp256k1::Secp256k1::new();
|
||||||
let message = "rust-bitcoin MessageSignature test";
|
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);
|
let msg = secp256k1::Message::from(msg_hash);
|
||||||
|
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ mod tests {
|
||||||
|
|
||||||
let secp = secp256k1::Secp256k1::new();
|
let secp = secp256k1::Secp256k1::new();
|
||||||
let message = "a different message from what was signed";
|
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"
|
// Signature of msg = "rust-bitcoin MessageSignature test"
|
||||||
// Signed with pk "UuOGDsfLPr4HIMKQX0ipjJeRaj1geCq3yPUF2COP5ME="
|
// Signed with pk "UuOGDsfLPr4HIMKQX0ipjJeRaj1geCq3yPUF2COP5ME="
|
||||||
|
|
Loading…
Reference in New Issue