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 <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-06-30 16:41:46 +01:00
parent 2716bc3311
commit d7decfd525

View File

@ -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());
}
}
}