mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 07:04:17 +00:00
refactor: clippy::useless_vec (#974)
Lint enabled by default but only nightly finds this yet
This commit is contained in:
parent
525848ff4e
commit
f1398ae6cb
1 changed files with 1 additions and 1 deletions
|
@ -348,7 +348,7 @@ mod tests {
|
||||||
|
|
||||||
// format!() is used to create a temporary String inside a closure, which suffers the same
|
// 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`
|
// 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();
|
let sss = items.iter().map(|s| format!("{s}{s}").red()).collect_vec();
|
||||||
assert_eq!(sss, vec![Span::from("aa").red(), Span::from("bb").red()]);
|
assert_eq!(sss, vec![Span::from("aa").red(), Span::from("bb").red()]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue