mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
io::Error: alphabeticise the match in as_str()
There was no rationale for the previous ordering. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
parent
47ab5f7ce2
commit
54df693dd7
@ -307,13 +307,13 @@ pub enum ErrorKind {
|
||||
impl ErrorKind {
|
||||
pub(crate) fn as_str(&self) -> &'static str {
|
||||
use ErrorKind::*;
|
||||
// Strictly alphabetical, please. (Sadly rustfmt cannot do this yet.)
|
||||
match *self {
|
||||
AddrInUse => "address in use",
|
||||
AddrNotAvailable => "address not available",
|
||||
AlreadyExists => "entity already exists",
|
||||
ArgumentListTooLong => "argument list too long",
|
||||
BrokenPipe => "broken pipe",
|
||||
ResourceBusy => "resource busy",
|
||||
ConnectionAborted => "connection aborted",
|
||||
ConnectionRefused => "connection refused",
|
||||
ConnectionReset => "connection reset",
|
||||
@ -321,9 +321,10 @@ impl ErrorKind {
|
||||
Deadlock => "deadlock",
|
||||
DirectoryNotEmpty => "directory not empty",
|
||||
ExecutableFileBusy => "executable file busy",
|
||||
FilenameTooLong => "filename too long",
|
||||
FilesystemQuotaExceeded => "filesystem quota exceeded",
|
||||
FileTooLarge => "file too large",
|
||||
FilenameTooLong => "filename too long",
|
||||
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
|
||||
FilesystemQuotaExceeded => "filesystem quota exceeded",
|
||||
HostUnreachable => "host unreachable",
|
||||
Interrupted => "operation interrupted",
|
||||
InvalidData => "invalid data",
|
||||
@ -332,16 +333,16 @@ impl ErrorKind {
|
||||
NetworkDown => "network down",
|
||||
NetworkUnreachable => "network unreachable",
|
||||
NotADirectory => "not a directory",
|
||||
StorageFull => "no storage space",
|
||||
NotConnected => "not connected",
|
||||
NotFound => "entity not found",
|
||||
NotSeekable => "seek on unseekable file",
|
||||
Other => "other error",
|
||||
OutOfMemory => "out of memory",
|
||||
PermissionDenied => "permission denied",
|
||||
ReadOnlyFilesystem => "read-only filesystem or storage medium",
|
||||
ResourceBusy => "resource busy",
|
||||
StaleNetworkFileHandle => "stale network file handle",
|
||||
FilesystemLoop => "filesystem loop or indirection limit (e.g. symlink loop)",
|
||||
NotSeekable => "seek on unseekable file",
|
||||
StorageFull => "no storage space",
|
||||
TimedOut => "timed out",
|
||||
TooManyLinks => "too many links",
|
||||
Uncategorized => "uncategorized error",
|
||||
|
Loading…
Reference in New Issue
Block a user