From bfd3deac7c98117fba4b8da5c89605a3c5d3fd40 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 Return For now it still relies on Aml::to_aml_bytes() for the child 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 401c73dce..7565f5647 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -646,10 +646,9 @@ impl<'a> Return<'a> { } impl<'a> Aml for Return<'a> { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = vec![0xa4]; /* ReturnOp */ + fn append_aml_bytes(&self, bytes: &mut Vec) { + bytes.push(0xa4); /* ReturnOp */ bytes.append(&mut self.value.to_aml_bytes()); - bytes } }