From 6172b6aac517182349850351ea452135005606f9 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 !binary_op macro 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 e045fca7a..b41950b6d 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -998,12 +998,11 @@ macro_rules! binary_op { } impl<'a> Aml for $name<'a> { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = vec![$opcode]; /* Op for the binary operator */ + fn append_aml_bytes(&self, bytes: &mut Vec) { + bytes.push($opcode); /* Op for the binary operator */ bytes.extend_from_slice(&self.a.to_aml_bytes()); bytes.extend_from_slice(&self.b.to_aml_bytes()); bytes.extend_from_slice(&self.target.to_aml_bytes()); - bytes } } };