Skip to content

Commit f2cc0cc

Browse files
authored
Rollup merge of rust-lang#68733 - cata0309:patch-1, r=Dylan-DPC
Update option.rs I updated the example of the `expect` examples so they won't contain depressing sentences any more !
2 parents cef6894 + 2ce14b8 commit f2cc0cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/option.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ impl<T> Option<T> {
331331
///
332332
/// ```
333333
/// let x = Some("value");
334-
/// assert_eq!(x.expect("the world is ending"), "value");
334+
/// assert_eq!(x.expect("fruits are healthy"), "value");
335335
/// ```
336336
///
337337
/// ```{.should_panic}
338338
/// let x: Option<&str> = None;
339-
/// x.expect("the world is ending"); // panics with `the world is ending`
339+
/// x.expect("fruits are healthy"); // panics with `fruits are healthy`
340340
/// ```
341341
#[inline]
342342
#[track_caller]

0 commit comments

Comments
 (0)