From f917198f2734468e5a6df204e9387bf5f973dcc1 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 3 Nov 2021 14:29:05 +0000 Subject: [PATCH] acpi_tables: aml: Implement Aml::append_aml_bytes() for constants Signed-off-by: Rob Bradford --- acpi_tables/src/aml.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index c6e40c4b8..63c2e274f 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -21,8 +21,8 @@ pub const ZERO: Zero = Zero {}; pub struct Zero {} impl Aml for Zero { - fn to_aml_bytes(&self) -> Vec { - vec![0u8] + fn append_aml_bytes(&self, v: &mut Vec) { + v.push(0u8) } } @@ -30,8 +30,8 @@ pub const ONE: One = One {}; pub struct One {} impl Aml for One { - fn to_aml_bytes(&self) -> Vec { - vec![1u8] + fn append_aml_bytes(&self, v: &mut Vec) { + v.push(1u8) } } @@ -39,8 +39,8 @@ pub const ONES: Ones = Ones {}; pub struct Ones {} impl Aml for Ones { - fn to_aml_bytes(&self) -> Vec { - vec![0xffu8] + fn append_aml_bytes(&self, v: &mut Vec) { + v.push(0xffu8) } }