Skip to content

Commit 9a61580

Browse files
committed
Option and Result: Add references to documentation of as_ref and as_mut
1 parent ad8a3eb commit 9a61580

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libcore/option.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl<T> Option<T> {
210210
// Adapter for working with references
211211
/////////////////////////////////////////////////////////////////////////
212212

213-
/// Converts from `Option<T>` to `Option<&T>`.
213+
/// Converts from `&Option<T>` to `Option<&T>`.
214214
///
215215
/// # Examples
216216
///
@@ -239,7 +239,7 @@ impl<T> Option<T> {
239239
}
240240
}
241241

242-
/// Converts from `Option<T>` to `Option<&mut T>`.
242+
/// Converts from `&mut Option<T>` to `Option<&mut T>`.
243243
///
244244
/// # Examples
245245
///

src/libcore/result.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl<T, E> Result<T, E> {
369369
// Adapter for working with references
370370
/////////////////////////////////////////////////////////////////////////
371371

372-
/// Converts from `Result<T, E>` to `Result<&T, &E>`.
372+
/// Converts from `&Result<T, E>` to `Result<&T, &E>`.
373373
///
374374
/// Produces a new `Result`, containing a reference
375375
/// into the original, leaving the original in place.
@@ -394,7 +394,7 @@ impl<T, E> Result<T, E> {
394394
}
395395
}
396396

397-
/// Converts from `Result<T, E>` to `Result<&mut T, &mut E>`.
397+
/// Converts from `&mut Result<T, E>` to `Result<&mut T, &mut E>`.
398398
///
399399
/// # Examples
400400
///

0 commit comments

Comments
 (0)