@@ -182,14 +182,14 @@ impl CertificateBuilder {
182182 let sensitive_der = rasn:: der:: encode ( & sensitive_attr) ?;
183183
184184 AttributeBuilder :: new ( )
185- . with_oid ( & oid. to_string ( ) )
185+ . with_oid ( oid. to_string ( ) )
186186 . with_value ( sensitive_der)
187187 . as_sensitive ( )
188188 . build ( ) ?
189189 } else {
190190 // Create a plain attribute
191191 AttributeBuilder :: new ( )
192- . with_oid ( & oid. to_string ( ) )
192+ . with_oid ( oid. to_string ( ) )
193193 . with_value ( & entry. value )
194194 . as_plain ( )
195195 . build ( ) ?
@@ -202,7 +202,7 @@ impl CertificateBuilder {
202202 let kyc_der = rasn:: der:: encode ( & kyc_attributes) ?;
203203
204204 // Create the extension
205- Ok ( Extension :: new ( & KYC_ATTRIBUTES_EXTENSION_OID . to_string ( ) , kyc_der, false ) ?)
205+ Ok ( Extension :: new ( KYC_ATTRIBUTES_EXTENSION_OID . to_string ( ) , kyc_der, false ) ?)
206206 }
207207}
208208
@@ -294,7 +294,7 @@ impl Certificate {
294294 /// Parse KYC attributes from an X.509 certificate
295295 fn parse_kyc_attributes ( x509_cert : & X509Certificate ) -> KYCAttributes {
296296 // Try to find the KYC attributes extension
297- if let Some ( extension) = x509_cert. get_extension ( & KYC_ATTRIBUTES_EXTENSION_OID . to_string ( ) ) {
297+ if let Some ( extension) = x509_cert. get_extension ( KYC_ATTRIBUTES_EXTENSION_OID . to_string ( ) ) {
298298 // Try to decode the extension value
299299 if let Ok ( kyc_attrs) = rasn:: der:: decode :: < KYCAttributes > ( extension. value . as_bytes ( ) ) {
300300 return kyc_attrs;
@@ -361,7 +361,7 @@ mod tests {
361361 ] ;
362362
363363 for ( name, builder) in builders {
364- assert ! ( builder. kyc_attributes. is_empty( ) , "Builder {} should have empty attributes" , name ) ;
364+ assert ! ( builder. kyc_attributes. is_empty( ) , "Builder {name } should have empty attributes" ) ;
365365 }
366366 }
367367
@@ -429,7 +429,7 @@ mod tests {
429429 let x509_cert = cert. to_x509 ( ) ;
430430 // Just check that we can access the X509 certificate
431431 assert ! ( x509_cert
432- . get_extension( & KYC_ATTRIBUTES_EXTENSION_OID . to_string( ) )
432+ . get_extension( KYC_ATTRIBUTES_EXTENSION_OID . to_string( ) )
433433 . is_none( ) ) ;
434434
435435 // Test Certificate.kyc_attributes
@@ -445,10 +445,10 @@ mod tests {
445445 assert ! ( matches!( result. unwrap_err( ) , CertificateError :: AttributeNotFound { .. } ) ) ;
446446 }
447447
448- fn test_certificate_building_functionality < T : KeyPair , S > ( account : Account < T > )
448+ fn test_certificate_building_functionality < T , S > ( account : Account < T > )
449449 where
450450 Account < T > : TryFrom < accounts:: Accountable < T > , Error = accounts:: AccountError > ,
451- T : CryptoSignerWithOptions < S > + ' static ,
451+ T : KeyPair + CryptoSignerWithOptions < S > + ' static ,
452452 S : SignatureEncoding ,
453453 {
454454 let subject_dn = x509:: utils:: create_dn ( & [ ( x509:: oids:: CN , "Test Subject" ) ] ) . unwrap ( ) ;
@@ -498,10 +498,10 @@ mod tests {
498498
499499 crate :: test_all_key_types!( test_certificate_building, test_certificate_building_functionality) ;
500500
501- fn test_certificate_attribute_type_errors < T : KeyPair , S > ( account : Account < T > )
501+ fn test_certificate_attribute_type_errors < T , S > ( account : Account < T > )
502502 where
503503 Account < T > : TryFrom < accounts:: Accountable < T > , Error = accounts:: AccountError > ,
504- T : CryptoSignerWithOptions < S > + ' static ,
504+ T : KeyPair + CryptoSignerWithOptions < S > + ' static ,
505505 S : SignatureEncoding ,
506506 {
507507 let subject_dn = x509:: utils:: create_dn ( & [ ( x509:: oids:: CN , "Test Subject" ) ] ) . unwrap ( ) ;
0 commit comments