Skip to content

Commit

Permalink
use copied instead of cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
brianp committed Feb 5, 2024
1 parent d714717 commit e921866
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/src/component/normal/legend_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ impl<B: Backend> Component<B> for LegendWidget {
let items_per_column = (command_items.len() as f32 / 3.0).ceil() as usize;

// Split the items into three columns
let column1_items = command_items.iter().take(items_per_column).cloned().collect::<Vec<_>>();
let column1_items = command_items.iter().take(items_per_column).copied().collect::<Vec<_>>();
let column2_items = command_items
.iter()
.skip(items_per_column)
.take(items_per_column)
.cloned()
.copied()
.collect::<Vec<_>>();
let column3_items = command_items
.iter()
.skip(2 * items_per_column)
.cloned()
.copied()
.collect::<Vec<_>>();

let layout = Layout::default()
Expand Down

0 comments on commit e921866

Please sign in to comment.