diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index d3592ba80..f4d0205fd 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -109,7 +109,7 @@ pub type Word = u16; impl Aml for Word { fn append_aml_bytes(&self, bytes: &mut Vec) { bytes.push(0x0b); /* WordPrefix */ - bytes.append(&mut self.to_le_bytes().to_vec()); + bytes.extend_from_slice(&self.to_le_bytes()) } } @@ -118,7 +118,7 @@ pub type DWord = u32; impl Aml for DWord { fn append_aml_bytes(&self, bytes: &mut Vec) { bytes.push(0x0c); /* DWordPrefix */ - bytes.append(&mut self.to_le_bytes().to_vec()); + bytes.extend_from_slice(&self.to_le_bytes()) } } @@ -127,7 +127,7 @@ pub type QWord = u64; impl Aml for QWord { fn append_aml_bytes(&self, bytes: &mut Vec) { bytes.push(0x0e); /* QWordPrefix */ - bytes.append(&mut self.to_le_bytes().to_vec()); + bytes.extend_from_slice(&self.to_le_bytes()) } }