mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +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 {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user