Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option and Result: Add references to documentation of as_ref and as_mut #59221

Merged
merged 1 commit into from
Mar 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
///
Expand Down