diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index b267c7d5c..90588440a 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -494,16 +494,14 @@ impl Io { } impl Aml for Io { - fn to_aml_bytes(&self) -> Vec { - let mut bytes = vec![0x47]; /* Io Port Descriptor */ + fn append_aml_bytes(&self, bytes: &mut Vec) { + bytes.push(0x47); /* Io Port Descriptor */ bytes.push(1); /* IODecode16 */ bytes.append(&mut self.min.to_le_bytes().to_vec()); bytes.append(&mut self.max.to_le_bytes().to_vec()); bytes.push(self.alignment); bytes.push(self.length); - - bytes } }