ErrorKind: Reformat the error string table
* Sort alphabetically. * use ErrorKind::*; Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
@@ -208,28 +208,29 @@ pub enum ErrorKind {
|
||||
|
||||
impl ErrorKind {
|
||||
pub(crate) fn as_str(&self) -> &'static str {
|
||||
use ErrorKind::*;
|
||||
match *self {
|
||||
ErrorKind::NotFound => "entity not found",
|
||||
ErrorKind::PermissionDenied => "permission denied",
|
||||
ErrorKind::ConnectionRefused => "connection refused",
|
||||
ErrorKind::ConnectionReset => "connection reset",
|
||||
ErrorKind::ConnectionAborted => "connection aborted",
|
||||
ErrorKind::NotConnected => "not connected",
|
||||
ErrorKind::AddrInUse => "address in use",
|
||||
ErrorKind::AddrNotAvailable => "address not available",
|
||||
ErrorKind::BrokenPipe => "broken pipe",
|
||||
ErrorKind::AlreadyExists => "entity already exists",
|
||||
ErrorKind::WouldBlock => "operation would block",
|
||||
ErrorKind::InvalidInput => "invalid input parameter",
|
||||
ErrorKind::InvalidData => "invalid data",
|
||||
ErrorKind::TimedOut => "timed out",
|
||||
ErrorKind::WriteZero => "write zero",
|
||||
ErrorKind::Interrupted => "operation interrupted",
|
||||
ErrorKind::UnexpectedEof => "unexpected end of file",
|
||||
ErrorKind::Unsupported => "unsupported",
|
||||
ErrorKind::OutOfMemory => "out of memory",
|
||||
ErrorKind::Other => "other error",
|
||||
ErrorKind::Uncategorized => "uncategorized error",
|
||||
AddrInUse => "address in use",
|
||||
AddrNotAvailable => "address not available",
|
||||
AlreadyExists => "entity already exists",
|
||||
BrokenPipe => "broken pipe",
|
||||
ConnectionAborted => "connection aborted",
|
||||
ConnectionRefused => "connection refused",
|
||||
ConnectionReset => "connection reset",
|
||||
Interrupted => "operation interrupted",
|
||||
InvalidData => "invalid data",
|
||||
InvalidInput => "invalid input parameter",
|
||||
NotConnected => "not connected",
|
||||
NotFound => "entity not found",
|
||||
Other => "other error",
|
||||
OutOfMemory => "out of memory",
|
||||
PermissionDenied => "permission denied",
|
||||
TimedOut => "timed out",
|
||||
Uncategorized => "uncategorized error",
|
||||
UnexpectedEof => "unexpected end of file",
|
||||
Unsupported => "unsupported",
|
||||
WouldBlock => "operation would block",
|
||||
WriteZero => "write zero",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user