Skip to content

Commit e0fd37d

Browse files
committed
Improve wording for Option and Result
1 parent b486fd5 commit e0fd37d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

library/core/src/option.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@
106106
//!
107107
//! *It's much nicer!*
108108
//!
109-
//! Ending the expression with [`?`] will result in the unwrapped
110-
//! success ([`Some`]) value, unless the result is [`None`], in which case
111-
//! [`None`] is returned early from the enclosing function.
109+
//! Ending the expression with [`?`] will result in the [`Some`]'s unwrapped value, unless the
110+
//! result is [`None`], in which case [`None`] is returned early from the enclosing function.
112111
//!
113-
//! [`?`] can only be used in functions that return [`Option`] because of the
112+
//! [`?`] can be used in functions that return [`Option`] because of the
114113
//! early return of [`None`] that it provides.
115114
//!
116115
//! [`?`]: crate::ops::Try

library/core/src/result.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,10 @@
209209
//!
210210
//! *It's much nicer!*
211211
//!
212-
//! Ending the expression with [`?`] will result in the unwrapped
213-
//! success ([`Ok`]) value, unless the result is [`Err`], in which case
214-
//! [`Err`] is returned early from the enclosing function.
212+
//! Ending the expression with [`?`] will result in the [`Ok`]'s unwrapped value, unless the result
213+
//! is [`Err`], in which case [`Err`] is returned early from the enclosing function.
215214
//!
216-
//! [`?`] can only be used in functions that return [`Result`] because of the
215+
//! [`?`] can be used in functions that return [`Result`] because of the
217216
//! early return of [`Err`] that it provides.
218217
//!
219218
//! [`expect`]: Result::expect

0 commit comments

Comments
 (0)