@@ -1450,21 +1450,20 @@ mod test {
1450
1450
1451
1451
let _ = conn. query_drop ( "DROP USER 'test_user'@'%'" ) . await ;
1452
1452
1453
- let query = format ! ( "CREATE USER 'test_user'@'%' IDENTIFIED WITH {}" , plug ) ;
1453
+ let query = format ! ( "CREATE USER 'test_user'@'%' IDENTIFIED WITH {plug}" ) ;
1454
1454
conn. query_drop ( query) . await . unwrap ( ) ;
1455
1455
1456
1456
if conn. inner . version < ( 8 , 0 , 11 ) {
1457
- conn. query_drop ( format ! ( "SET old_passwords = {}" , val ) )
1457
+ conn. query_drop ( format ! ( "SET old_passwords = {val}" ) )
1458
1458
. await
1459
1459
. unwrap ( ) ;
1460
1460
conn. query_drop ( format ! (
1461
- "SET PASSWORD FOR 'test_user'@'%' = PASSWORD('{}')" ,
1462
- pass
1461
+ "SET PASSWORD FOR 'test_user'@'%' = PASSWORD('{pass}')"
1463
1462
) )
1464
1463
. await
1465
1464
. unwrap ( ) ;
1466
1465
} else {
1467
- conn. query_drop ( format ! ( "SET PASSWORD FOR 'test_user'@'%' = '{}'" , pass ) )
1466
+ conn. query_drop ( format ! ( "SET PASSWORD FOR 'test_user'@'%' = '{pass }'" ) )
1468
1467
. await
1469
1468
. unwrap ( ) ;
1470
1469
} ;
@@ -1481,11 +1480,11 @@ mod test {
1481
1480
}
1482
1481
1483
1482
if crate :: test_misc:: test_compression ( ) {
1484
- assert ! ( format!( "{:?}" , conn ) . contains( "Compression" ) ) ;
1483
+ assert ! ( format!( "{conn :?}" ) . contains( "Compression" ) ) ;
1485
1484
}
1486
1485
1487
1486
if crate :: test_misc:: test_ssl ( ) {
1488
- assert ! ( format!( "{:?}" , conn ) . contains( "Tls" ) ) ;
1487
+ assert ! ( format!( "{conn :?}" ) . contains( "Tls" ) ) ;
1489
1488
}
1490
1489
1491
1490
conn. disconnect ( ) . await ?;
@@ -1781,9 +1780,8 @@ mod test {
1781
1780
let mut conn = Conn :: new ( get_opts ( ) ) . await ?;
1782
1781
for x in ( MAX_PAYLOAD_LEN - 2 ) ..=( MAX_PAYLOAD_LEN + 2 ) {
1783
1782
let long_string = "A" . repeat ( x) ;
1784
- let result: Vec < ( String , u8 ) > = conn
1785
- . query ( format ! ( r"SELECT '{}', 231" , long_string) )
1786
- . await ?;
1783
+ let result: Vec < ( String , u8 ) > =
1784
+ conn. query ( format ! ( r"SELECT '{long_string}', 231" ) ) . await ?;
1787
1785
assert_eq ! ( ( long_string, 231_u8 ) , result[ 0 ] ) ;
1788
1786
}
1789
1787
conn. disconnect ( ) . await ?;
@@ -2318,7 +2316,7 @@ mod test {
2318
2316
. tcp_port ( listen_addr. port ( ) ) ;
2319
2317
let server_err = match Conn :: new ( opts) . await {
2320
2318
Err ( Error :: Server ( server_err) ) => server_err,
2321
- other => panic ! ( "expected server error but got: {:?}" , other ) ,
2319
+ other => panic ! ( "expected server error but got: {other :?}" ) ,
2322
2320
} ;
2323
2321
assert_eq ! (
2324
2322
server_err,
0 commit comments