Rollup merge of #28885 - frewsxcv:patch-25, r=alexcrichton
This commit is contained in:
commit
c66ff93da7
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user