Signature tests: Remove redundant clones found by Clippy.

This commit is contained in:
Brian Smith 2020-12-03 16:06:58 -08:00
parent d58e2dadde
commit d57c8d56a2
2 changed files with 3 additions and 6 deletions

View File

@ -86,7 +86,7 @@ fn ecdsa_from_pkcs8_test() {
match (
signature::EcdsaKeyPair::from_pkcs8(this_asn1, &input),
error.clone(),
error,
) {
(Ok(_), None) => (),
(Err(e), None) => panic!("Failed with error \"{}\", but expected to succeed", e),

View File

@ -114,10 +114,7 @@ fn test_ed25519_from_pkcs8_unchecked() {
let input = test_case.consume_bytes("Input");
let error = test_case.consume_optional_string("Error");
match (
Ed25519KeyPair::from_pkcs8_maybe_unchecked(&input),
error.clone(),
) {
match (Ed25519KeyPair::from_pkcs8_maybe_unchecked(&input), error) {
(Ok(_), None) => (),
(Err(e), None) => panic!("Failed with error \"{}\", but expected to succeed", e),
(Ok(_), Some(e)) => panic!("Succeeded, but expected error \"{}\"", e),
@ -139,7 +136,7 @@ fn test_ed25519_from_pkcs8() {
let input = test_case.consume_bytes("Input");
let error = test_case.consume_optional_string("Error");
match (Ed25519KeyPair::from_pkcs8(&input), error.clone()) {
match (Ed25519KeyPair::from_pkcs8(&input), error) {
(Ok(_), None) => (),
(Err(e), None) => panic!("Failed with error \"{}\", but expected to succeed", e),
(Ok(_), Some(e)) => panic!("Succeeded, but expected error \"{}\"", e),