diff options
| author | Kevin Reid <kpreid@google.com> | 2021-09-04 11:17:34 -0700 |
|---|---|---|
| committer | Kevin Reid <kpreid@google.com> | 2021-09-04 11:30:14 -0700 |
| commit | c2f432058c8dcf3d210ea673d178b3768815f80d (patch) | |
| tree | f0d497df3b8a7f97ef5058c71770c5503f003a2e | |
| parent | 34c1fce50be88eb4a0b81eb486b47e1f929b1ce3 (diff) | |
| download | rust-c2f432058c8dcf3d210ea673d178b3768815f80d.tar.gz rust-c2f432058c8dcf3d210ea673d178b3768815f80d.zip | |
Add sentence punctuation and links in `Option` docs.
| -rw-r--r-- | library/core/src/option.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 899a3b83df6..64333a82387 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1173,7 +1173,7 @@ impl<T> Option<T> { // Entry-like operations to insert a value and return a reference ///////////////////////////////////////////////////////////////////////// - /// Inserts `value` into the option then returns a mutable reference to it. + /// Inserts `value` into the option, then returns a mutable reference to it. /// /// If the option already contains a value, the old value is dropped. /// @@ -1397,7 +1397,7 @@ impl<T> Option<T> { } impl<T, U> Option<(T, U)> { - /// Unzips an option containing a tuple of two options + /// Unzips an option containing a tuple of two options. /// /// If `self` is `Some((a, b))` this method returns `(Some(a), Some(b))`. /// Otherwise, `(None, None)` is returned. @@ -1500,7 +1500,7 @@ impl<T: Clone> Option<&mut T> { } impl<T: Default> Option<T> { - /// Returns the contained [`Some`] value or a default + /// Returns the contained [`Some`] value or a default. /// /// Consumes the `self` argument then, if [`Some`], returns the contained /// value, otherwise if [`None`], returns the [default value] for that @@ -1561,7 +1561,7 @@ impl<T: DerefMut> Option<T> { /// Converts from `Option<T>` (or `&mut Option<T>`) to `Option<&mut T::Target>`. /// /// Leaves the original `Option` in-place, creating a new one containing a mutable reference to - /// the inner type's `Deref::Target` type. + /// the inner type's [`Deref::Target`] type. /// /// # Examples /// @@ -2039,7 +2039,7 @@ impl<T> ops::FromResidual for Option<T> { } impl<T> Option<Option<T>> { - /// Converts from `Option<Option<T>>` to `Option<T>` + /// Converts from `Option<Option<T>>` to `Option<T>`. /// /// # Examples /// |
