From 8b7bfca9b0ac9fb378e38e51267564a09ee6e5a1 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 3 Nov 2021 14:29:05 +0000 Subject: [PATCH] acpi_tables: aml: Implement Aml::append_aml_bytes() for Store For now it still relies on Aml::to_aml_bytes() for the children as not all structures have been ported. Signed-off-by: Rob Bradford --- acpi_tables/src/aml.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index c868ab781..3ab644227 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -869,11 +869,10 @@ impl<'a> Store<'a> { } impl<'a> Aml for Store<'a> { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = vec![0x70]; /* StoreOp */ + fn append_aml_bytes(&self, bytes: &mut Vec) { + bytes.push(0x70); /* StoreOp */ bytes.extend_from_slice(&self.value.to_aml_bytes()); bytes.extend_from_slice(&self.name.to_aml_bytes()); - bytes } }