@@ -14,7 +14,7 @@ use std::env;
1414async fn main ( ) -> Result < ( ) > {
1515 let uri = env:: var ( "SCYLLA_URI" ) . unwrap_or_else ( |_| "127.0.0.1:9042" . to_string ( ) ) ;
1616
17- println ! ( "Connecting to {} ..." , uri ) ;
17+ println ! ( "Connecting to {uri } ..." ) ;
1818
1919 let session: Session = SessionBuilder :: new ( ) . known_node ( uri) . build ( ) . await ?;
2020
@@ -51,7 +51,7 @@ async fn main() -> Result<()> {
5151 Err ( _) => continue , // We might read a date that does not fit in NaiveDate, skip it
5252 } ;
5353
54- println ! ( "Parsed a date into chrono::NaiveDate: {:?}" , read_date ) ;
54+ println ! ( "Parsed a date into chrono::NaiveDate: {read_date :?}" ) ;
5555 }
5656
5757 // Alternatively, you can enable 'time' feature and use `time::Date` to represent date. `time::Date` only allows
@@ -73,7 +73,7 @@ async fn main() -> Result<()> {
7373 Err ( _) => continue , // We might read a date that does not fit in time::Date, skip it
7474 } ;
7575
76- println ! ( "Parsed a date into time::Date: {:?}" , read_date ) ;
76+ println ! ( "Parsed a date into time::Date: {read_date :?}" ) ;
7777 }
7878
7979 // Dates outside this range must be represented in the raw form - an u32 describing days since -5877641-06-23
@@ -95,7 +95,7 @@ async fn main() -> Result<()> {
9595 _ => panic ! ( "oh no" ) ,
9696 } ;
9797
98- println ! ( "Read a date as raw days: {}" , read_days ) ;
98+ println ! ( "Read a date as raw days: {read_days}" ) ;
9999 }
100100
101101 // Time
@@ -126,7 +126,7 @@ async fn main() -> Result<()> {
126126 . await ?
127127 . rows_stream :: < ( NaiveTime , ) > ( ) ?;
128128 while let Some ( ( read_time, ) ) = iter. try_next ( ) . await ? {
129- println ! ( "Parsed a time into chrono::NaiveTime: {:?}" , read_time ) ;
129+ println ! ( "Parsed a time into chrono::NaiveTime: {read_time :?}" ) ;
130130 }
131131
132132 // time::Time
@@ -141,7 +141,7 @@ async fn main() -> Result<()> {
141141 . await ?
142142 . rows_stream :: < ( time:: Time , ) > ( ) ?;
143143 while let Some ( ( read_time, ) ) = iter. try_next ( ) . await ? {
144- println ! ( "Parsed a time into time::Time: {:?}" , read_time ) ;
144+ println ! ( "Parsed a time into time::Time: {read_time :?}" ) ;
145145 }
146146
147147 // CqlTime
@@ -156,7 +156,7 @@ async fn main() -> Result<()> {
156156 . await ?
157157 . rows_stream :: < ( CqlTime , ) > ( ) ?;
158158 while let Some ( ( read_time, ) ) = iter. try_next ( ) . await ? {
159- println ! ( "Read a time as raw nanos: {:?}" , read_time ) ;
159+ println ! ( "Read a time as raw nanos: {read_time :?}" ) ;
160160 }
161161
162162 // Timestamp
@@ -187,10 +187,7 @@ async fn main() -> Result<()> {
187187 . await ?
188188 . rows_stream :: < ( DateTime < Utc > , ) > ( ) ?;
189189 while let Some ( ( read_time, ) ) = iter. try_next ( ) . await ? {
190- println ! (
191- "Parsed a timestamp into chrono::DateTime<chrono::Utc>: {:?}" ,
192- read_time
193- ) ;
190+ println ! ( "Parsed a timestamp into chrono::DateTime<chrono::Utc>: {read_time:?}" ) ;
194191 }
195192
196193 // time::OffsetDateTime
@@ -208,10 +205,7 @@ async fn main() -> Result<()> {
208205 . await ?
209206 . rows_stream :: < ( time:: OffsetDateTime , ) > ( ) ?;
210207 while let Some ( ( read_time, ) ) = iter. try_next ( ) . await ? {
211- println ! (
212- "Parsed a timestamp into time::OffsetDateTime: {:?}" ,
213- read_time
214- ) ;
208+ println ! ( "Parsed a timestamp into time::OffsetDateTime: {read_time:?}" ) ;
215209 }
216210
217211 // CqlTimestamp
@@ -229,7 +223,7 @@ async fn main() -> Result<()> {
229223 . await ?
230224 . rows_stream :: < ( CqlTimestamp , ) > ( ) ?;
231225 while let Some ( ( read_time, ) ) = iter. try_next ( ) . await ? {
232- println ! ( "Read a timestamp as raw millis: {:?}" , read_time ) ;
226+ println ! ( "Read a timestamp as raw millis: {read_time :?}" ) ;
233227 }
234228
235229 Ok ( ( ) )
0 commit comments