]> git.lizzy.rs Git - rust.git/commitdiff
Fix comment in docstring example for Error::kind
authorAskaholic <askaholic@protonmail.com>
Sat, 25 Apr 2020 04:33:11 +0000 (04:33 +0000)
committerGitHub <noreply@github.com>
Sat, 25 Apr 2020 04:33:11 +0000 (04:33 +0000)
src/libstd/io/error.rs

index 3b55d9b900235a6ba8df31882758e2eb35d9ce8d..d80a38819ead0db6ad0441e4d62a31753b372b0d 100644 (file)
@@ -487,9 +487,9 @@ pub fn into_inner(self) -> Option<Box<dyn error::Error + Send + Sync>> {
     /// }
     ///
     /// fn main() {
-    ///     // Will print "No inner error".
+    ///     // Will print "Other".
     ///     print_error(Error::last_os_error());
-    ///     // Will print "Inner error: ...".
+    ///     // Will print "AddrInUse".
     ///     print_error(Error::new(ErrorKind::AddrInUse, "oh no!"));
     /// }
     /// ```