Skip to content

Commit 8debe61

Browse files
Rollup merge of rust-lang#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
2 parents ed64b97 + 479b919 commit 8debe61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/borrow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl<'a, B: ?Sized> Cow<'a, B>
232232
///
233233
/// assert_eq!(
234234
/// cow.into_owned(),
235-
/// Cow::Owned(String::from(s))
235+
/// String::from(s)
236236
/// );
237237
/// ```
238238
///
@@ -246,7 +246,7 @@ impl<'a, B: ?Sized> Cow<'a, B>
246246
///
247247
/// assert_eq!(
248248
/// cow.into_owned(),
249-
/// Cow::Owned(String::from(s))
249+
/// String::from(s)
250250
/// );
251251
/// ```
252252
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)