about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-02-02 14:15:48 +0100
committerGitHub <noreply@github.com>2020-02-02 14:15:48 +0100
commitf2cc0cc09d6c83d1a8715cff2b98a03b33be4724 (patch)
treebb1bc0c5cf837e3cdd8d9a89ee841bd4459b53da /src
parentcef68945722fa593a4a1314f4a2f1ff095aab4f4 (diff)
parent2ce14b8a19865ed359e9df7eb5e8e6186cae1e58 (diff)
Rollup merge of #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 !
Diffstat (limited to 'src')
-rw-r--r--src/libcore/option.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index cb4247d9874..ad0491f888c 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -331,12 +331,12 @@ impl<T> Option<T> {
     ///
     /// ```
     /// let x = Some("value");
-    /// assert_eq!(x.expect("the world is ending"), "value");
+    /// assert_eq!(x.expect("fruits are healthy"), "value");
     /// ```
     ///
     /// ```{.should_panic}
     /// let x: Option<&str> = None;
-    /// x.expect("the world is ending"); // panics with `the world is ending`
+    /// x.expect("fruits are healthy"); // panics with `fruits are healthy`
     /// ```
     #[inline]
     #[track_caller]