Rollup merge of #45993 - QuietMisdreavus:anti-cow, r=kennytm
examples in Cow::into_owned don't need to wrap result in Cows This totally confused me until i triple-checked the actual return value and opened the examples in the playground myself. r? @rust-lang/docs
This commit is contained in:
commit
8debe610ee
1 changed files with 2 additions and 2 deletions
|
@ -232,7 +232,7 @@ impl<'a, B: ?Sized> Cow<'a, B>
|
|||
///
|
||||
/// assert_eq!(
|
||||
/// cow.into_owned(),
|
||||
/// Cow::Owned(String::from(s))
|
||||
/// String::from(s)
|
||||
/// );
|
||||
/// ```
|
||||
///
|
||||
|
@ -246,7 +246,7 @@ impl<'a, B: ?Sized> Cow<'a, B>
|
|||
///
|
||||
/// assert_eq!(
|
||||
/// cow.into_owned(),
|
||||
/// Cow::Owned(String::from(s))
|
||||
/// String::from(s)
|
||||
/// );
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue