Improve wording for Option and Result

This commit is contained in:
Chris AtLee 2022-12-13 14:49:10 -05:00
parent b486fd5d83
commit e0fd37dcf7
2 changed files with 6 additions and 8 deletions

View File

@ -106,11 +106,10 @@
//! //!
//! *It's much nicer!* //! *It's much nicer!*
//! //!
//! Ending the expression with [`?`] will result in the unwrapped //! Ending the expression with [`?`] will result in the [`Some`]'s unwrapped value, unless the
//! success ([`Some`]) value, unless the result is [`None`], in which case //! result is [`None`], in which case [`None`] is returned early from the enclosing function.
//! [`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. //! early return of [`None`] that it provides.
//! //!
//! [`?`]: crate::ops::Try //! [`?`]: crate::ops::Try

View File

@ -209,11 +209,10 @@
//! //!
//! *It's much nicer!* //! *It's much nicer!*
//! //!
//! Ending the expression with [`?`] will result in the unwrapped //! Ending the expression with [`?`] will result in the [`Ok`]'s unwrapped value, unless the result
//! success ([`Ok`]) value, unless the result is [`Err`], in which case //! is [`Err`], in which case [`Err`] is returned early from the enclosing function.
//! [`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. //! early return of [`Err`] that it provides.
//! //!
//! [`expect`]: Result::expect //! [`expect`]: Result::expect