From a7b8a13e143c7e9c071149648d4681095a4abe4a Mon Sep 17 00:00:00 2001 From: m-r-r Date: Sun, 27 Apr 2014 14:45:28 +0200 Subject: [PATCH] Added missing values in std::io::standard_error() --- src/libstd/io/mod.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 9c163523abe..2a4952ec830 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1408,7 +1408,21 @@ pub fn standard_error(kind: IoErrorKind) -> IoError { EndOfFile => "end of file", IoUnavailable => "I/O is unavailable", InvalidInput => "invalid input", - _ => fail!() + OtherIoError => "unknown I/O error", + FileNotFound => "file not found", + PermissionDenied => "permission denied", + ConnectionFailed => "connection failed", + Closed => "stream is closed", + ConnectionRefused => "connection refused", + ConnectionReset => "connection reset", + ConnectionAborted => "connection aborted", + NotConnected => "not connected", + BrokenPipe => "broken pipe", + PathAlreadyExists => "file exists", + PathDoesntExist => "no such file", + MismatchedFileTypeForOperation => "mismatched file type", + ResourceUnavailable => "resource unavailable", + TimedOut => "operation timed out" }; IoError { kind: kind,