about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarincia Catalin <35623921+cata0309@users.noreply.github.com>2020-02-01 19:05:50 +0200
committerGitHub <noreply@github.com>2020-02-01 19:05:50 +0200
commit2ce14b8a19865ed359e9df7eb5e8e6186cae1e58 (patch)
treedda07e1aab19c9acc02aa9574eeed7a6bdc5b696
parent6c0b779b7bb23ad1bead914e8023642cc2368406 (diff)
downloadrust-2ce14b8a19865ed359e9df7eb5e8e6186cae1e58.tar.gz
rust-2ce14b8a19865ed359e9df7eb5e8e6186cae1e58.zip
Update option.rs
I updated the example of the `expect` examples so they won't contain depressing sentences any more !
-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]