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 <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-11-03 14:29:05 +00:00
parent 6172b6aac5
commit 99467982aa

View File

@ -1037,13 +1037,11 @@ impl<'a> MethodCall<'a> {
}
impl<'a> Aml for MethodCall<'a> {
fn to_aml_bytes(&self) -> Vec<u8> {
let mut bytes = Vec::new();
bytes.extend_from_slice(&self.name.to_aml_bytes());
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
self.name.append_aml_bytes(bytes);
for arg in self.args.iter() {
bytes.extend_from_slice(&arg.to_aml_bytes());
}
bytes
}
}