File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
examples/current-time/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub fn main() -> Result<(), now::NowError> {
1515 let mut line = String :: with_capacity ( 80 ) ;
1616 for tz_name in TZ_NAMES {
1717 if line. len ( ) + 2 + tz_name. len ( ) >= 80 {
18- println ! ( "{}," , line ) ;
18+ println ! ( "{line }," ) ;
1919 line. clear ( ) ;
2020 }
2121 if !line. is_empty ( ) {
@@ -24,7 +24,7 @@ pub fn main() -> Result<(), now::NowError> {
2424 line. push_str ( tz_name) ;
2525 }
2626 if !line. is_empty ( ) {
27- println ! ( "{}" , line ) ;
27+ println ! ( "{line}" ) ;
2828 }
2929 return Ok ( ( ) ) ;
3030 }
@@ -33,14 +33,14 @@ pub fn main() -> Result<(), now::NowError> {
3333 match tz_by_name ( & argument) {
3434 Some ( timezone) => timezone,
3535 None => {
36- eprintln ! ( "No such time zone found in database: {:?}" , argument ) ;
37- eprintln ! ( "To see a list of all known time zones run: {} --list" , exe ) ;
36+ eprintln ! ( "No such time zone found in database: {argument :?}" ) ;
37+ eprintln ! ( "To see a list of all known time zones run: {exe } --list" ) ;
3838 exit ( 1 ) ;
3939 } ,
4040 }
4141 } else {
4242 eprintln ! ( "No time zone selected, defaulting to the system time zone." ) ;
43- eprintln ! ( "To see a list of all known time zones run: {} --list" , exe ) ;
43+ eprintln ! ( "To see a list of all known time zones run: {exe } --list" ) ;
4444 eprintln ! ( ) ;
4545 local_tz ( ) . unwrap_or ( time_zone:: UTC )
4646 } ;
@@ -77,7 +77,7 @@ pub fn main() -> Result<(), now::NowError> {
7777 dt. minute( ) ,
7878 dt. second( ) ,
7979 ) ;
80- println ! ( "{}" , dt ) ;
80+ println ! ( "{dt}" ) ;
8181
8282 Ok ( ( ) )
8383}
You can’t perform that action at this time.
0 commit comments