acpi_tables: aml: Implement Aml::append_aml_bytes() for Equal

For now it still relies on Aml::to_aml_bytes() for the predicates 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 29f46ee470
commit 8c9f0e407f

View File

@ -813,11 +813,10 @@ impl<'a> Equal<'a> {
}
impl<'a> Aml for Equal<'a> {
fn to_aml_bytes(&self) -> Vec<u8> {
let mut bytes = vec![0x93]; /* LEqualOp */
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
bytes.push(0x93); /* LEqualOp */
bytes.extend_from_slice(&self.left.to_aml_bytes());
bytes.extend_from_slice(&self.right.to_aml_bytes());
bytes
}
}