mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
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:
parent
395929f1d4
commit
5902ceb955
@ -136,8 +136,10 @@ pub struct Name {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Aml for Name {
|
impl Aml for Name {
|
||||||
fn to_aml_bytes(&self) -> Vec<u8> {
|
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
|
||||||
self.bytes.clone()
|
// TODO: Refactor this to make more efficient but there are
|
||||||
|
// lifetime/ownership challenges.
|
||||||
|
bytes.append(&mut self.bytes.clone())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user