diff options
| author | Chris AtLee <chris@atlee.ca> | 2022-12-13 14:49:10 -0500 |
|---|---|---|
| committer | Chris AtLee <chris@atlee.ca> | 2022-12-13 14:49:10 -0500 |
| commit | e0fd37dcf79c8624092ccd0e1463cd239074ec83 (patch) | |
| tree | bdd459d19742537321b3083428af105c68988e8f | |
| parent | b486fd5d8300b8648eccfdde749725b3799dfa4d (diff) | |
| download | rust-e0fd37dcf79c8624092ccd0e1463cd239074ec83.tar.gz rust-e0fd37dcf79c8624092ccd0e1463cd239074ec83.zip | |
Improve wording for Option and Result
| -rw-r--r-- | library/core/src/option.rs | 7 | ||||
| -rw-r--r-- | library/core/src/result.rs | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 699e04eff2b..39462dca4ff 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -106,11 +106,10 @@ //! //! *It's much nicer!* //! -//! Ending the expression with [`?`] will result in the unwrapped -//! success ([`Some`]) value, unless the result is [`None`], in which case -//! [`None`] is returned early from the enclosing function. +//! Ending the expression with [`?`] will result in the [`Some`]'s unwrapped value, unless the +//! result is [`None`], in which case [`None`] is returned early from the enclosing function. //! -//! [`?`] can only be used in functions that return [`Option`] because of the +//! [`?`] can be used in functions that return [`Option`] because of the //! early return of [`None`] that it provides. //! //! [`?`]: crate::ops::Try diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 3f33c5fd6ca..f00c40f35d5 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -209,11 +209,10 @@ //! //! *It's much nicer!* //! -//! Ending the expression with [`?`] will result in the unwrapped -//! success ([`Ok`]) value, unless the result is [`Err`], in which case -//! [`Err`] is returned early from the enclosing function. +//! Ending the expression with [`?`] will result in the [`Ok`]'s unwrapped value, unless the result +//! is [`Err`], in which case [`Err`] is returned early from the enclosing function. //! -//! [`?`] can only be used in functions that return [`Result`] because of the +//! [`?`] can be used in functions that return [`Result`] because of the //! early return of [`Err`] that it provides. //! //! [`expect`]: Result::expect |
