@@ -35,7 +35,7 @@ async fn main() -> Result<()> {
3535 //
3636 // Here we set the key `TiKV` to have the value `Rust` associated with it.
3737 client. put ( KEY . to_owned ( ) , VALUE . to_owned ( ) ) . await . unwrap ( ) ; // Returns a `tikv_client::Error` on failure.
38- println ! ( "Put key {:?}, value {:?}." , KEY , VALUE ) ;
38+ println ! ( "Put key {KEY :?}, value {VALUE :?}." ) ;
3939
4040 // Unlike a standard Rust HashMap all calls take owned values. This is because under the hood
4141 // protobufs must take ownership of the data. If we only took a borrow we'd need to internally
@@ -48,15 +48,15 @@ async fn main() -> Result<()> {
4848 // types are supported as well, but it all ends up as `Vec<u8>` in the end.
4949 let value: Option < Value > = client. get ( KEY . to_owned ( ) ) . await ?;
5050 assert_eq ! ( value, Some ( Value :: from( VALUE . to_owned( ) ) ) ) ;
51- println ! ( "Get key `{}` returned value {:?}." , KEY , value ) ;
51+ println ! ( "Get key `{KEY }` returned value {value :?}." ) ;
5252
5353 // You can also set the `ColumnFamily` used by the request.
5454 // This is *advanced usage* and should have some special considerations.
5555 client
5656 . delete ( KEY . to_owned ( ) )
5757 . await
5858 . expect ( "Could not delete value" ) ;
59- println ! ( "Key: `{}` deleted" , KEY ) ;
59+ println ! ( "Key: `{KEY }` deleted" ) ;
6060
6161 // Here we check if the key has been deleted from the key-value store.
6262 let value: Option < Value > = client
@@ -80,7 +80,7 @@ async fn main() -> Result<()> {
8080 . batch_get ( keys. clone ( ) )
8181 . await
8282 . expect ( "Could not get values" ) ;
83- println ! ( "Found values: {:?} for keys: {:?}" , values , keys ) ;
83+ println ! ( "Found values: {values :?} for keys: {keys :?}" ) ;
8484
8585 // Scanning a range of keys is also possible giving it two bounds
8686 // it will returns all entries between these two.
@@ -96,7 +96,7 @@ async fn main() -> Result<()> {
9696 & keys,
9797 & [ Key :: from( "k1" . to_owned( ) ) , Key :: from( "k2" . to_owned( ) ) , ]
9898 ) ;
99- println ! ( "Scaning from {:?} to {:?} gives: {:?}" , start , end , keys ) ;
99+ println ! ( "Scanning from {start :?} to {end :?} gives: {keys :?}" ) ;
100100
101101 let k1 = "k1" ;
102102 let k2 = "k2" ;
@@ -126,10 +126,7 @@ async fn main() -> Result<()> {
126126 "v3" . to_owned( )
127127 ]
128128 ) ;
129- println ! (
130- "Scaning batch scan from {:?} gives: {:?}" ,
131- batch_scan_keys, vals
132- ) ;
129+ println ! ( "Scanning batch scan from {batch_scan_keys:?} gives: {vals:?}" ) ;
133130
134131 // Cleanly exit.
135132 Ok ( ( ) )
0 commit comments