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

This is a naive implementation and there is scope to improve this
without extra copies but that requires addressing the users to ensure
there are no lifetime issues.

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 395929f1d4
commit 5902ceb955

View File

@ -136,8 +136,10 @@ pub struct Name {
}
impl Aml for Name {
fn to_aml_bytes(&self) -> Vec<u8> {
self.bytes.clone()
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
// TODO: Refactor this to make more efficient but there are
// lifetime/ownership challenges.
bytes.append(&mut self.bytes.clone())
}
}