Rollup merge of #28885 - frewsxcv:patch-25, r=alexcrichton

This commit is contained in:
Steve Klabnik 2015-10-07 18:18:38 -04:00
commit c66ff93da7
1 changed files with 2 additions and 1 deletions

View File

@ -706,7 +706,8 @@ impl<T> Option<T> {
}
impl<'a, T: Clone> Option<&'a T> {
/// Maps an Option<&T> to an Option<T> by cloning the contents of the Option.
/// Maps an `Option<&T>` to an `Option<T>` by cloning the contents of the
/// option.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn cloned(self) -> Option<T> {
self.map(|t| t.clone())