From f1398ae6cb1abd32106923d64844b482c7ba6f82 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Sat, 2 Mar 2024 11:18:29 +0100 Subject: [PATCH] refactor: clippy::useless_vec (#974) Lint enabled by default but only nightly finds this yet --- src/style/stylize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/style/stylize.rs b/src/style/stylize.rs index fc810ce9..0de60db6 100644 --- a/src/style/stylize.rs +++ b/src/style/stylize.rs @@ -348,7 +348,7 @@ mod tests { // format!() is used to create a temporary String inside a closure, which suffers the same // issue as above without the `Styled` trait impl for `String` - let items = vec![String::from("a"), String::from("b")]; + let items = [String::from("a"), String::from("b")]; let sss = items.iter().map(|s| format!("{s}{s}").red()).collect_vec(); assert_eq!(sss, vec![Span::from("aa").red(), Span::from("bb").red()]); }