@@ -208,28 +208,29 @@ pub enum ErrorKind {
208208
209209impl ErrorKind {
210210 pub ( crate ) fn as_str ( & self ) -> & ' static str {
211+ use ErrorKind :: * ;
211212 match * self {
212- ErrorKind :: NotFound => "entity not found " ,
213- ErrorKind :: PermissionDenied => "permission denied " ,
214- ErrorKind :: ConnectionRefused => "connection refused " ,
215- ErrorKind :: ConnectionReset => "connection reset " ,
216- ErrorKind :: ConnectionAborted => "connection aborted" ,
217- ErrorKind :: NotConnected => "not connected " ,
218- ErrorKind :: AddrInUse => "address in use " ,
219- ErrorKind :: AddrNotAvailable => "address not available " ,
220- ErrorKind :: BrokenPipe => "broken pipe " ,
221- ErrorKind :: AlreadyExists => "entity already exists " ,
222- ErrorKind :: WouldBlock => "operation would block " ,
223- ErrorKind :: InvalidInput => "invalid input parameter " ,
224- ErrorKind :: InvalidData => "invalid data " ,
225- ErrorKind :: TimedOut => "timed out" ,
226- ErrorKind :: WriteZero => "write zero " ,
227- ErrorKind :: Interrupted => "operation interrupted " ,
228- ErrorKind :: UnexpectedEof => "unexpected end of file " ,
229- ErrorKind :: Unsupported => "unsupported " ,
230- ErrorKind :: OutOfMemory => "out of memory " ,
231- ErrorKind :: Other => "other error " ,
232- ErrorKind :: Uncategorized => "uncategorized error " ,
213+ AddrInUse => "address in use " ,
214+ AddrNotAvailable => "address not available " ,
215+ AlreadyExists => "entity already exists " ,
216+ BrokenPipe => "broken pipe " ,
217+ ConnectionAborted => "connection aborted" ,
218+ ConnectionRefused => "connection refused " ,
219+ ConnectionReset => "connection reset " ,
220+ Interrupted => "operation interrupted " ,
221+ InvalidData => "invalid data " ,
222+ InvalidInput => "invalid input parameter " ,
223+ NotConnected => "not connected " ,
224+ NotFound => "entity not found " ,
225+ Other => "other error " ,
226+ OutOfMemory => "out of memory " ,
227+ PermissionDenied => "permission denied " ,
228+ TimedOut => "timed out " ,
229+ Uncategorized => "uncategorized error " ,
230+ UnexpectedEof => "unexpected end of file " ,
231+ Unsupported => "unsupported " ,
232+ WouldBlock => "operation would block " ,
233+ WriteZero => "write zero " ,
233234 }
234235 }
235236}
0 commit comments