Skip to content

Commit b459b70

Browse files
committed
Fixed clippy complaints.
Signed-off-by: Mike Smoot <mes@aescon.com>
1 parent 714c656 commit b459b70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

psa-crypto/tests/mac.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ fn get_attrs(alg: &Mac, key_type: Type) -> Attributes {
3030
let mut usage = UsageFlags::default();
3131
let _ = usage.set_sign_hash().set_verify_hash();
3232
Attributes {
33-
key_type: key_type.clone(),
33+
key_type,
3434
bits: 256,
3535
lifetime: Lifetime::Volatile,
3636
policy: Policy {
3737
usage_flags: usage,
38-
permitted_algorithms: Algorithm::Mac(alg.clone()),
38+
permitted_algorithms: Algorithm::Mac(*alg),
3939
},
4040
}
4141
}
@@ -47,7 +47,7 @@ fn test_mac_compute(mac_alg: Mac, key_type: Type, expected: &[u8]) -> Result<()>
4747
let my_key = import(attributes, None, &KEY)?;
4848
let buffer_size = attributes.mac_length(mac_alg)?;
4949
let mut mac = vec![0; buffer_size];
50-
let _size = compute_mac(my_key, mac_alg, &MESSAGE, &mut mac)?;
50+
compute_mac(my_key, mac_alg, &MESSAGE, &mut mac)?;
5151
assert_eq!(expected, mac);
5252
Ok(())
5353
}
@@ -57,7 +57,7 @@ fn test_mac_verify(mac_alg: Mac, key_type: Type, expected: &[u8]) -> Result<()>
5757
let attributes = get_attrs(&mac_alg, key_type);
5858
psa_crypto::init()?;
5959
let my_key = import(attributes, None, &KEY)?;
60-
let _size = verify_mac(my_key, mac_alg, &MESSAGE, &expected)?;
60+
verify_mac(my_key, mac_alg, &MESSAGE, expected)?;
6161
Ok(())
6262
}
6363

0 commit comments

Comments
 (0)