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

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 8c9f0e407f
commit c0ca6b5377

View File

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