about summary refs log tree commit diff
path: root/src/libcore/option.rs
diff options
context:
space:
mode:
authorJonathan Strong <jstrong@legis.io>2017-12-07 12:19:24 -0500
committerJonathan Strong <jstrong@legis.io>2017-12-07 12:19:24 -0500
commit5847d0babdb4bc4545d9aeb9ef89862589ae1504 (patch)
tree287c2946af427e4555cd22b98b7ab9a8f7e9a247 /src/libcore/option.rs
parent9307917d6abc115faf7d2cb625c550cb509b5c4d (diff)
downloadrust-5847d0babdb4bc4545d9aeb9ef89862589ae1504.tar.gz
rust-5847d0babdb4bc4545d9aeb9ef89862589ae1504.zip
adds links to methods, removes trailing whitespace
Diffstat (limited to 'src/libcore/option.rs')
-rw-r--r--src/libcore/option.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index e354c7e16a1..0d7ec6071fb 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -338,9 +338,11 @@ impl<T> Option<T> {
 
     /// Returns the contained value or a default.
     ///
-    /// Arguments passed to `unwrap_or` are eagerly evaluated; if you are passing 
-    /// the result of a function call, it is recommended to use `unwrap_or_else`, 
-    /// which is lazily evaluated. 
+    /// Arguments passed to `unwrap_or` are eagerly evaluated; if you are passing
+    /// the result of a function call, it is recommended to use [`unwrap_or_else`],
+    /// which is lazily evaluated.
+    ///
+    /// [`unwrap_or_else`]: #method.unwrap_or_else
     ///
     /// # Examples
     ///
@@ -456,7 +458,7 @@ impl<T> Option<T> {
     /// [`Ok(v)`] and [`None`] to [`Err(err)`].
     ///
     /// Arguments passed to `ok_or` are eagerly evaluated; if you are passing the
-    /// result of a function call, it is recommended to use `ok_or_else`, which is
+    /// result of a function call, it is recommended to use [`ok_or_else`], which is
     /// lazily evaluated.
     ///
     /// [`Result<T, E>`]: ../../std/result/enum.Result.html
@@ -464,6 +466,7 @@ impl<T> Option<T> {
     /// [`Err(err)`]: ../../std/result/enum.Result.html#variant.Err
     /// [`None`]: #variant.None
     /// [`Some(v)`]: #variant.Some
+    /// [`ok_or_else`]: #method.ok_or_else
     ///
     /// # Examples
     ///
@@ -618,9 +621,11 @@ impl<T> Option<T> {
     /// Returns the option if it contains a value, otherwise returns `optb`.
     ///
     /// Arguments passed to `or` are eagerly evaluated; if you are passing the
-    /// result of a function call, it is recommended to use `or_else`, which is
+    /// result of a function call, it is recommended to use [`or_else`], which is
     /// lazily evaluated.
     ///
+    /// [`or_else`]: #method.or_else
+    ///
     /// # Examples
     ///
     /// ```