@@ -31,7 +31,7 @@ pub enum FromSliceUntilNulError {
31
31
impl Display for FromSliceUntilNulError {
32
32
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
33
33
match self {
34
- Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {}" , usize ) ,
34
+ Self :: InvalidChar ( usize) => write ! ( f, "invalid character at index {usize}" ) ,
35
35
Self :: NoNul => write ! ( f, "no nul character" ) ,
36
36
}
37
37
}
@@ -56,8 +56,8 @@ pub enum FromSliceWithNulError {
56
56
impl Display for FromSliceWithNulError {
57
57
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
58
58
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}" ) ,
61
61
Self :: NotNulTerminated => write ! ( f, "not null-terminated" ) ,
62
62
}
63
63
}
@@ -85,8 +85,8 @@ pub enum UnalignedCStr16Error {
85
85
impl Display for UnalignedCStr16Error {
86
86
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
87
87
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}" ) ,
90
90
Self :: NotNulTerminated => write ! ( f, "not null-terminated" ) ,
91
91
Self :: BufferTooSmall => write ! ( f, "buffer too small" ) ,
92
92
}
@@ -112,8 +112,8 @@ pub enum FromStrWithBufError {
112
112
impl Display for FromStrWithBufError {
113
113
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
114
114
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}" ) ,
117
117
Self :: BufferTooSmall => write ! ( f, "buffer too small" ) ,
118
118
}
119
119
}
0 commit comments