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 {
|
impl ErrorKind {
|
||||||
pub(crate) fn as_str(&self) -> &'static str {
|
pub(crate) fn as_str(&self) -> &'static str {
|
||||||
|
use ErrorKind::*;
|
||||||
match *self {
|
match *self {
|
||||||
ErrorKind::NotFound => "entity not found",
|
AddrInUse => "address in use",
|
||||||
ErrorKind::PermissionDenied => "permission denied",
|
AddrNotAvailable => "address not available",
|
||||||
ErrorKind::ConnectionRefused => "connection refused",
|
AlreadyExists => "entity already exists",
|
||||||
ErrorKind::ConnectionReset => "connection reset",
|
BrokenPipe => "broken pipe",
|
||||||
ErrorKind::ConnectionAborted => "connection aborted",
|
ConnectionAborted => "connection aborted",
|
||||||
ErrorKind::NotConnected => "not connected",
|
ConnectionRefused => "connection refused",
|
||||||
ErrorKind::AddrInUse => "address in use",
|
ConnectionReset => "connection reset",
|
||||||
ErrorKind::AddrNotAvailable => "address not available",
|
Interrupted => "operation interrupted",
|
||||||
ErrorKind::BrokenPipe => "broken pipe",
|
InvalidData => "invalid data",
|
||||||
ErrorKind::AlreadyExists => "entity already exists",
|
InvalidInput => "invalid input parameter",
|
||||||
ErrorKind::WouldBlock => "operation would block",
|
NotConnected => "not connected",
|
||||||
ErrorKind::InvalidInput => "invalid input parameter",
|
NotFound => "entity not found",
|
||||||
ErrorKind::InvalidData => "invalid data",
|
Other => "other error",
|
||||||
ErrorKind::TimedOut => "timed out",
|
OutOfMemory => "out of memory",
|
||||||
ErrorKind::WriteZero => "write zero",
|
PermissionDenied => "permission denied",
|
||||||
ErrorKind::Interrupted => "operation interrupted",
|
TimedOut => "timed out",
|
||||||
ErrorKind::UnexpectedEof => "unexpected end of file",
|
Uncategorized => "uncategorized error",
|
||||||
ErrorKind::Unsupported => "unsupported",
|
UnexpectedEof => "unexpected end of file",
|
||||||
ErrorKind::OutOfMemory => "out of memory",
|
Unsupported => "unsupported",
|
||||||
ErrorKind::Other => "other error",
|
WouldBlock => "operation would block",
|
||||||
ErrorKind::Uncategorized => "uncategorized error",
|
WriteZero => "write zero",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user