]> git.lizzy.rs Git - rust.git/commitdiff
Improve std::io::ErrorKind
authorSteve Klabnik <steve@steveklabnik.com>
Tue, 18 Aug 2015 17:53:32 +0000 (13:53 -0400)
committerSteve Klabnik <steve@steveklabnik.com>
Wed, 19 Aug 2015 14:22:18 +0000 (10:22 -0400)
Hopefully make this distinction a little more clear.

Fixes #27637

src/libstd/io/error.rs

index 17a72e0f1b5e5b7d00321cf88c6a8856e74d3718..eb39a836c439a7ac7d4698f534b2d43041cdc3ca 100644 (file)
@@ -125,6 +125,9 @@ pub enum ErrorKind {
     /// Unlike `InvalidInput`, this typically means that the operation
     /// parameters were valid, however the error was caused by malformed
     /// input data.
+    ///
+    /// For example, a function that reads a file into a string will error with
+    /// `InvalidData` if the file's contents are not valid UTF-8.
     #[stable(feature = "io_invalid_data", since = "1.2.0")]
     InvalidData,
     /// The I/O operation's timeout expired, causing it to be canceled.