diff options
| author | Chris Gregory <czipperz@gmail.com> | 2019-03-15 16:42:10 -0400 |
|---|---|---|
| committer | Chris Gregory <czipperz@gmail.com> | 2019-03-15 16:42:10 -0400 |
| commit | 9a61580d40df576d6774028cbba6a49b3c9dc0fe (patch) | |
| tree | 471491aaac898e4720cb8d0d1a8f53ab5a3c0750 | |
| parent | ad8a3eb039ca3dc1ff5a3d5757afc5e5330c1bce (diff) | |
| download | rust-9a61580d40df576d6774028cbba6a49b3c9dc0fe.tar.gz rust-9a61580d40df576d6774028cbba6a49b3c9dc0fe.zip | |
Option and Result: Add references to documentation of as_ref and as_mut
| -rw-r--r-- | src/libcore/option.rs | 4 | ||||
| -rw-r--r-- | src/libcore/result.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 46dfe28da62..75fa24aa4dc 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -210,7 +210,7 @@ impl<T> Option<T> { // Adapter for working with references ///////////////////////////////////////////////////////////////////////// - /// Converts from `Option<T>` to `Option<&T>`. + /// Converts from `&Option<T>` to `Option<&T>`. /// /// # Examples /// @@ -239,7 +239,7 @@ impl<T> Option<T> { } } - /// Converts from `Option<T>` to `Option<&mut T>`. + /// Converts from `&mut Option<T>` to `Option<&mut T>`. /// /// # Examples /// diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 2bd6b536301..967f7e3e2fe 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -369,7 +369,7 @@ impl<T, E> Result<T, E> { // Adapter for working with references ///////////////////////////////////////////////////////////////////////// - /// Converts from `Result<T, E>` to `Result<&T, &E>`. + /// Converts from `&Result<T, E>` to `Result<&T, &E>`. /// /// Produces a new `Result`, containing a reference /// into the original, leaving the original in place. @@ -394,7 +394,7 @@ impl<T, E> Result<T, E> { } } - /// Converts from `Result<T, E>` to `Result<&mut T, &mut E>`. + /// Converts from `&mut Result<T, E>` to `Result<&mut T, &mut E>`. /// /// # Examples /// |
