From a558b19c9a7b90a1ed3f309301f49f0b483e02ec Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Tue, 27 Feb 2024 13:28:53 +0100 Subject: [PATCH] refactor: clippy::implicit_clone (#974) --- Cargo.toml | 1 + src/widgets/table/table.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 18ee7681..81a1e64a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,6 +66,7 @@ unsafe_code = "forbid" [lints.clippy] cloned_instead_of_copied = "warn" explicit_iter_loop = "warn" +implicit_clone = "warn" missing_const_for_fn = "warn" needless_for_each = "warn" semicolon_if_nothing_returned = "warn" diff --git a/src/widgets/table/table.rs b/src/widgets/table/table.rs index 801e9f45..fe3e3281 100644 --- a/src/widgets/table/table.rs +++ b/src/widgets/table/table.rs @@ -736,7 +736,7 @@ impl Table<'_> { // Divide the space between each column equally vec![Constraint::Length(max_width / col_count.max(1) as u16); col_count] } else { - self.widths.to_vec() + self.widths.clone() }; // this will always allocate a selection area let [_selection_area, columns_area] =