Skip to content

Commit eb795c2

Browse files
committed
word wrpa
1 parent c46d9f6 commit eb795c2

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

library/std/src/io/error.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,16 @@ struct Custom {
144144
///
145145
/// # Handling errors and matching on `ErrorKind`
146146
///
147-
/// In application code, use `match` for the `ErrorKind` values you are expecting; use `_` to match
148-
/// "all other errors".
147+
/// In application code, use `match` for the `ErrorKind` values you are
148+
/// expecting; use `_` to match "all other errors".
149149
///
150-
/// In comprehensive and thorough tests that want to verify that a test doesn't return any known incorrect error kind,
151-
/// you may want to cut-and-paste the current full list of errors from here into your test code, and then match `_` as the correct case. This seems counterintuitive,
152-
/// but it will make your tests more robust. In particular, if you want to verify that your code does produce an
153-
/// unrecognized error kind, the robust solution is to check for all the recognized error kinds and fail in those cases.
150+
/// In comprehensive and thorough tests that want to verify that a test doesn't
151+
/// return any known incorrect error kind, you may want to cut-and-paste the
152+
/// current full list of errors from here into your test code, and then match
153+
/// `_` as the correct case. This seems counterintuitive, but it will make your
154+
/// tests more robust. In particular, if you want to verify that your code does
155+
/// produce an unrecognized error kind, the robust solution is to check for all
156+
/// the recognized error kinds and fail in those cases.
154157
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155158
#[stable(feature = "rust1", since = "1.0.0")]
156159
#[allow(deprecated)]

0 commit comments

Comments
 (0)