Skip to content

Commit

Permalink
refactor: clippy::useless_vec (#974)
Browse files Browse the repository at this point in the history
Lint enabled by default but only nightly finds this yet
  • Loading branch information
EdJoPaTo authored and joshka committed Mar 4, 2024
1 parent 525848f commit f1398ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/style/stylize.rs
Expand Up @@ -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()]);
}
Expand Down

0 comments on commit f1398ae

Please sign in to comment.