@@ -31,7 +31,7 @@ pub enum FromSliceUntilNulError {
3131impl Display for FromSliceUntilNulError {
3232 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
3333 match self {
34- Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {}" , usize ) ,
34+ Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {usize}" ) ,
3535 Self :: NoNul => write ! ( f, "no nul character" ) ,
3636 }
3737 }
@@ -56,8 +56,8 @@ pub enum FromSliceWithNulError {
5656impl Display for FromSliceWithNulError {
5757 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
5858 match self {
59- Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {}" , usize ) ,
60- Self :: InteriorNul ( usize) => write ! ( f, "interior null character at index {}" , usize ) ,
59+ Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {usize}" ) ,
60+ Self :: InteriorNul ( usize) => write ! ( f, "interior null character at index {usize}" ) ,
6161 Self :: NotNulTerminated => write ! ( f, "not null-terminated" ) ,
6262 }
6363 }
@@ -85,8 +85,8 @@ pub enum UnalignedCStr16Error {
8585impl Display for UnalignedCStr16Error {
8686 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
8787 match self {
88- Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {}" , usize ) ,
89- Self :: InteriorNul ( usize) => write ! ( f, "interior null character at index {}" , usize ) ,
88+ Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {usize}" ) ,
89+ Self :: InteriorNul ( usize) => write ! ( f, "interior null character at index {usize}" ) ,
9090 Self :: NotNulTerminated => write ! ( f, "not null-terminated" ) ,
9191 Self :: BufferTooSmall => write ! ( f, "buffer too small" ) ,
9292 }
@@ -112,8 +112,8 @@ pub enum FromStrWithBufError {
112112impl Display for FromStrWithBufError {
113113 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
114114 match self {
115- Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {}" , usize ) ,
116- Self :: InteriorNul ( usize) => write ! ( f, "interior null character at index {}" , usize ) ,
115+ Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {usize}" ) ,
116+ Self :: InteriorNul ( usize) => write ! ( f, "interior null character at index {usize}" ) ,
117117 Self :: BufferTooSmall => write ! ( f, "buffer too small" ) ,
118118 }
119119 }
0 commit comments