1
Fork 0

enable rust_2018_idioms for doctests

Signed-off-by: ozkanonur <work@onurozkan.dev>
This commit is contained in:
ozkanonur 2023-05-07 00:12:29 +03:00
parent 8b8110e146
commit 4e7c14fe9f
37 changed files with 125 additions and 101 deletions

View file

@ -3142,8 +3142,8 @@ where
///
/// ```
/// # use std::borrow::Cow;
/// let o: Cow<[i32]> = Cow::Owned(vec![1, 2, 3]);
/// let b: Cow<[i32]> = Cow::Borrowed(&[1, 2, 3]);
/// let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);
/// let b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);
/// assert_eq!(Vec::from(o), Vec::from(b));
/// ```
fn from(s: Cow<'a, [T]>) -> Vec<T> {