From 2ce14b8a19865ed359e9df7eb5e8e6186cae1e58 Mon Sep 17 00:00:00 2001 From: Marincia Catalin <35623921+cata0309@users.noreply.github.com> Date: Sat, 1 Feb 2020 19:05:50 +0200 Subject: [PATCH] Update option.rs I updated the example of the `expect` examples so they won't contain depressing sentences any more ! --- src/libcore/option.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/option.rs b/src/libcore/option.rs index cb4247d98745e..ad0491f888cc7 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -331,12 +331,12 @@ impl Option { /// /// ``` /// 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]