@@ -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