Skip to content

Commit c2f4320

Browse files
committed
Add sentence punctuation and links in Option docs.
1 parent 34c1fce commit c2f4320

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/core/src/option.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ impl<T> Option<T> {
11731173
// Entry-like operations to insert a value and return a reference
11741174
/////////////////////////////////////////////////////////////////////////
11751175

1176-
/// Inserts `value` into the option then returns a mutable reference to it.
1176+
/// Inserts `value` into the option, then returns a mutable reference to it.
11771177
///
11781178
/// If the option already contains a value, the old value is dropped.
11791179
///
@@ -1397,7 +1397,7 @@ impl<T> Option<T> {
13971397
}
13981398

13991399
impl<T, U> Option<(T, U)> {
1400-
/// Unzips an option containing a tuple of two options
1400+
/// Unzips an option containing a tuple of two options.
14011401
///
14021402
/// If `self` is `Some((a, b))` this method returns `(Some(a), Some(b))`.
14031403
/// Otherwise, `(None, None)` is returned.
@@ -1500,7 +1500,7 @@ impl<T: Clone> Option<&mut T> {
15001500
}
15011501

15021502
impl<T: Default> Option<T> {
1503-
/// Returns the contained [`Some`] value or a default
1503+
/// Returns the contained [`Some`] value or a default.
15041504
///
15051505
/// Consumes the `self` argument then, if [`Some`], returns the contained
15061506
/// value, otherwise if [`None`], returns the [default value] for that
@@ -1561,7 +1561,7 @@ impl<T: DerefMut> Option<T> {
15611561
/// Converts from `Option<T>` (or `&mut Option<T>`) to `Option<&mut T::Target>`.
15621562
///
15631563
/// Leaves the original `Option` in-place, creating a new one containing a mutable reference to
1564-
/// the inner type's `Deref::Target` type.
1564+
/// the inner type's [`Deref::Target`] type.
15651565
///
15661566
/// # Examples
15671567
///
@@ -2039,7 +2039,7 @@ impl<T> ops::FromResidual for Option<T> {
20392039
}
20402040

20412041
impl<T> Option<Option<T>> {
2042-
/// Converts from `Option<Option<T>>` to `Option<T>`
2042+
/// Converts from `Option<Option<T>>` to `Option<T>`.
20432043
///
20442044
/// # Examples
20452045
///

0 commit comments

Comments
 (0)