Skip to content

Commit 479b919

Browse files
examples in Cow::into_owned don't need to wrap result in Cows
1 parent ff0f5de commit 479b919

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/borrow.rs

Lines changed: 2 additions & 2 deletions
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)