@@ -18,20 +18,21 @@ pub struct Extent {
1818
1919impl Debug for Extent {
2020 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
21- write ! ( f, "Extent({})" , self )
21+ write ! ( f, "Extent({self })" )
2222 }
2323}
2424
2525impl Display for Extent {
2626 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
27+ let dim = self . dim ;
2728 if let Some ( max) = self . max {
2829 if self . dim == max {
29- write ! ( f, "{}" , self . dim )
30+ write ! ( f, "{dim}" )
3031 } else {
31- write ! ( f, "{}..={}" , self . dim , max )
32+ write ! ( f, "{dim }..={max}" )
3233 }
3334 } else {
34- write ! ( f, "{}.." , self . dim )
35+ write ! ( f, "{dim }.." )
3536 }
3637 }
3738}
@@ -190,7 +191,7 @@ impl Deref for SimpleExtents {
190191
191192impl Debug for SimpleExtents {
192193 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
193- write ! ( f, "SimpleExtents({})" , self )
194+ write ! ( f, "SimpleExtents({self })" )
194195 }
195196}
196197
@@ -202,7 +203,7 @@ impl Display for SimpleExtents {
202203 write ! ( f, "({},)" , self [ 0 ] )
203204 } else {
204205 let extents = self . iter ( ) . map ( ToString :: to_string) . collect :: < Vec < _ > > ( ) . join ( ", " ) ;
205- write ! ( f, "({})" , extents )
206+ write ! ( f, "({extents })" )
206207 }
207208 }
208209}
@@ -466,7 +467,7 @@ impl Display for Extents {
466467 match self {
467468 Self :: Null => write ! ( f, "null" ) ,
468469 Self :: Scalar => write ! ( f, "scalar" ) ,
469- Self :: Simple ( ref e) => write ! ( f, "{}" , e ) ,
470+ Self :: Simple ( ref e) => write ! ( f, "{e}" ) ,
470471 }
471472 }
472473}
0 commit comments