@@ -862,7 +862,7 @@ fn session_find_objects() -> testresult::TestResult {
862
862
let key_template = vec ! [
863
863
Attribute :: Token ( true ) ,
864
864
Attribute :: Encrypt ( true ) ,
865
- Attribute :: Label ( format!( "key_{}" , i ) . as_bytes( ) . to_vec( ) ) ,
865
+ Attribute :: Label ( format!( "key_{i}" ) . as_bytes( ) . to_vec( ) ) ,
866
866
Attribute :: ValueLen ( 32 . into( ) ) ,
867
867
Attribute :: Id ( "12345678" . as_bytes( ) . to_vec( ) ) , // reusing the same CKA_ID
868
868
] ;
@@ -914,7 +914,7 @@ fn session_objecthandle_iterator() -> testresult::TestResult {
914
914
Attribute :: Token ( true ) ,
915
915
Attribute :: Encrypt ( true ) ,
916
916
Attribute :: ValueLen ( 32 . into( ) ) ,
917
- Attribute :: Label ( format!( "key_{}" , i ) . as_bytes( ) . to_vec( ) ) ,
917
+ Attribute :: Label ( format!( "key_{i}" ) . as_bytes( ) . to_vec( ) ) ,
918
918
Attribute :: Id ( "12345678" . as_bytes( ) . to_vec( ) ) , // reusing the same CKA_ID
919
919
] ;
920
920
@@ -1088,27 +1088,27 @@ fn login_feast() {
1088
1088
let session = pkcs11. open_rw_session ( slot) . unwrap ( ) ;
1089
1089
match session. login ( UserType :: User , Some ( & AuthPin :: new ( USER_PIN . into ( ) ) ) ) {
1090
1090
Ok ( _) | Err ( Error :: Pkcs11 ( RvError :: UserAlreadyLoggedIn , Function :: Login ) ) => { }
1091
- Err ( e) => panic ! ( "Bad error response: {}" , e ) ,
1091
+ Err ( e) => panic ! ( "Bad error response: {e}" ) ,
1092
1092
}
1093
1093
match session. login ( UserType :: User , Some ( & AuthPin :: new ( USER_PIN . into ( ) ) ) ) {
1094
1094
Ok ( _) | Err ( Error :: Pkcs11 ( RvError :: UserAlreadyLoggedIn , Function :: Login ) ) => { }
1095
- Err ( e) => panic ! ( "Bad error response: {}" , e ) ,
1095
+ Err ( e) => panic ! ( "Bad error response: {e}" ) ,
1096
1096
}
1097
1097
match session. login ( UserType :: User , Some ( & AuthPin :: new ( USER_PIN . into ( ) ) ) ) {
1098
1098
Ok ( _) | Err ( Error :: Pkcs11 ( RvError :: UserAlreadyLoggedIn , Function :: Login ) ) => { }
1099
- Err ( e) => panic ! ( "Bad error response: {}" , e ) ,
1099
+ Err ( e) => panic ! ( "Bad error response: {e}" ) ,
1100
1100
}
1101
1101
match session. logout ( ) {
1102
1102
Ok ( _) | Err ( Error :: Pkcs11 ( RvError :: UserNotLoggedIn , Function :: Logout ) ) => { }
1103
- Err ( e) => panic ! ( "Bad error response: {}" , e ) ,
1103
+ Err ( e) => panic ! ( "Bad error response: {e}" ) ,
1104
1104
}
1105
1105
match session. logout ( ) {
1106
1106
Ok ( _) | Err ( Error :: Pkcs11 ( RvError :: UserNotLoggedIn , Function :: Logout ) ) => { }
1107
- Err ( e) => panic ! ( "Bad error response: {}" , e ) ,
1107
+ Err ( e) => panic ! ( "Bad error response: {e}" ) ,
1108
1108
}
1109
1109
match session. logout ( ) {
1110
1110
Ok ( _) | Err ( Error :: Pkcs11 ( RvError :: UserNotLoggedIn , Function :: Logout ) ) => { }
1111
- Err ( e) => panic ! ( "Bad error response: {}" , e ) ,
1111
+ Err ( e) => panic ! ( "Bad error response: {e}" ) ,
1112
1112
}
1113
1113
} ) ) ;
1114
1114
}
@@ -1405,7 +1405,7 @@ fn is_initialized_test() {
1405
1405
1406
1406
match pkcs11. initialize ( CInitializeArgs :: OsThreads ) {
1407
1407
Err ( Error :: AlreadyInitialized ) => ( ) ,
1408
- Err ( e) => panic ! ( "Got unexpected error when initializing: {}" , e ) ,
1408
+ Err ( e) => panic ! ( "Got unexpected error when initializing: {e}" ) ,
1409
1409
Ok ( ( ) ) => panic ! ( "Initializing twice should not have been allowed" ) ,
1410
1410
}
1411
1411
}
@@ -1517,7 +1517,7 @@ fn ro_rw_session_test() -> TestResult {
1517
1517
if let Error :: Pkcs11 ( RvError :: SessionReadOnly , _f) = e {
1518
1518
// as expected
1519
1519
} else {
1520
- panic ! ( "Got wrong error code (expecting SessionReadOnly): {}" , e ) ;
1520
+ panic ! ( "Got wrong error code (expecting SessionReadOnly): {e}" ) ;
1521
1521
}
1522
1522
ro_session. logout ( ) ?;
1523
1523
}
@@ -2163,8 +2163,7 @@ fn wait_for_slot_event() {
2163
2163
Function :: WaitForSlotEvent
2164
2164
) )
2165
2165
) ,
2166
- "res = {:?}" ,
2167
- res
2166
+ "res = {res:?}"
2168
2167
) ;
2169
2168
}
2170
2169
0 commit comments