about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-11-16 10:05:05 +0100
committerGitHub <noreply@github.com>2017-11-16 10:05:05 +0100
commit8debe610ee91ad544ec65d38e4a89e69bdac8705 (patch)
tree78406a478eda0947bc382630d7459b8ed00cf158 /src/liballoc
parented64b97d613f32d9f1ba889068c2dd71883b8c87 (diff)
parent479b91901ddab2a3f50c6fd88660695576816c8b (diff)
downloadrust-8debe610ee91ad544ec65d38e4a89e69bdac8705.tar.gz
rust-8debe610ee91ad544ec65d38e4a89e69bdac8705.zip
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
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/borrow.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/borrow.rs b/src/liballoc/borrow.rs
index e8aff099871..acae0daa86b 100644
--- a/src/liballoc/borrow.rs
+++ b/src/liballoc/borrow.rs
@@ -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")]