From d7decfd5259f5f38c0d4f52a411923760c69d67a Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 30 Jun 2022 16:41:46 +0100 Subject: [PATCH] build: Fix beta clippy issue (unnecessary_to_owned) warning: unnecessary use of `to_vec` --> acpi_tables/src/aml.rs:71:37 | 71 | bytes.extend_from_slice(&part.to_vec()); | ^^^^^^^^^^^^^^ help: use: `part.as_ref()` | = note: `#[warn(clippy::unnecessary_to_owned)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned Signed-off-by: Rob Bradford --- acpi_tables/src/aml.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index 1b6d6476f..d3590fc73 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -68,7 +68,7 @@ impl Aml for Path { }; for part in self.name_parts.clone().iter_mut() { - bytes.extend_from_slice(&part.to_vec()); + bytes.extend_from_slice(part.as_ref()); } } }