From 99467982aaf8de6fb8ba9da9d9c72a27078b424d 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 MethodCall 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index b41950b6d..3d98a1a44 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -1037,13 +1037,11 @@ impl<'a> MethodCall<'a> { } impl<'a> Aml for MethodCall<'a> { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = Vec::new(); - bytes.extend_from_slice(&self.name.to_aml_bytes()); + fn append_aml_bytes(&self, bytes: &mut Vec) { + self.name.append_aml_bytes(bytes); for arg in self.args.iter() { bytes.extend_from_slice(&arg.to_aml_bytes()); } - bytes } }