acpi_tables: aml: Implement Aml::append_aml_bytes() for Path

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-11-03 14:29:05 +00:00
parent f917198f27
commit 4bd0ac6623

View File

@ -50,9 +50,7 @@ pub struct Path {
} }
impl Aml for Path { impl Aml for Path {
fn to_aml_bytes(&self) -> Vec<u8> { fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
let mut bytes = Vec::new();
if self.root { if self.root {
bytes.push(b'\\'); bytes.push(b'\\');
} }
@ -72,8 +70,6 @@ impl Aml for Path {
for part in self.name_parts.clone().iter_mut() { for part in self.name_parts.clone().iter_mut() {
bytes.append(&mut part.to_vec()); bytes.append(&mut part.to_vec());
} }
bytes
} }
} }