1
Fork 0

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:
Guillaume Gomez 2017-11-16 10:05:05 +01:00 committed by GitHub
commit 8debe610ee

View file

@ -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")]