Skip to content

Commit

Permalink
refactor: clippy::inefficient_to_string (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo authored and joshka committed Mar 4, 2024
1 parent a558b19 commit 8536760
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -67,6 +67,7 @@ unsafe_code = "forbid"
cloned_instead_of_copied = "warn"
explicit_iter_loop = "warn"
implicit_clone = "warn"
inefficient_to_string = "warn"
missing_const_for_fn = "warn"
needless_for_each = "warn"
semicolon_if_nothing_returned = "warn"
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/list.rs
Expand Up @@ -1197,7 +1197,7 @@ mod tests {

/// helper method to take a vector of strings and return a vector of list items
fn list_items(items: Vec<&str>) -> Vec<ListItem> {
items.iter().map(|i| ListItem::new(i.to_string())).collect()
items.into_iter().map(ListItem::new).collect()
}

/// helper method to render a widget to an empty buffer with the default state
Expand Down

0 comments on commit 8536760

Please sign in to comment.