From 9f5f92cf68e469bceef7d6917fc61023ef97d8cd Mon Sep 17 00:00:00 2001 From: Nicole Date: Wed, 22 Jan 2025 16:14:49 -0300 Subject: [PATCH] revert extend_from_slice to extend --- .../fields/fft_friendly/quartic_babybear.rs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/math/src/field/fields/fft_friendly/quartic_babybear.rs b/math/src/field/fields/fft_friendly/quartic_babybear.rs index a37ad79ea..23cc0227e 100644 --- a/math/src/field/fields/fft_friendly/quartic_babybear.rs +++ b/math/src/field/fields/fft_friendly/quartic_babybear.rs @@ -221,18 +221,18 @@ impl ByteConversion for [FieldElement; 4] { #[cfg(feature = "alloc")] fn to_bytes_be(&self) -> alloc::vec::Vec { let mut byte_slice = ByteConversion::to_bytes_be(&self[0]); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_be(&self[1])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_be(&self[2])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_be(&self[3])); + byte_slice.extend(ByteConversion::to_bytes_be(&self[1])); + byte_slice.extend(ByteConversion::to_bytes_be(&self[2])); + byte_slice.extend(ByteConversion::to_bytes_be(&self[3])); byte_slice } #[cfg(feature = "alloc")] fn to_bytes_le(&self) -> alloc::vec::Vec { let mut byte_slice = ByteConversion::to_bytes_le(&self[0]); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_le(&self[1])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_le(&self[2])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_le(&self[3])); + byte_slice.extend(ByteConversion::to_bytes_le(&self[1])); + byte_slice.extend(ByteConversion::to_bytes_le(&self[2])); + byte_slice.extend(ByteConversion::to_bytes_le(&self[3])); byte_slice } @@ -269,17 +269,17 @@ impl ByteConversion for [FieldElement; 4] { impl ByteConversion for FieldElement { fn to_bytes_be(&self) -> alloc::vec::Vec { let mut byte_slice = ByteConversion::to_bytes_be(&self.value()[0]); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_be(&self.value()[1])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_be(&self.value()[2])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_be(&self.value()[3])); + byte_slice.extend(ByteConversion::to_bytes_be(&self.value()[1])); + byte_slice.extend(ByteConversion::to_bytes_be(&self.value()[2])); + byte_slice.extend(ByteConversion::to_bytes_be(&self.value()[3])); byte_slice } fn to_bytes_le(&self) -> alloc::vec::Vec { let mut byte_slice = ByteConversion::to_bytes_le(&self.value()[0]); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_le(&self.value()[1])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_le(&self.value()[2])); - byte_slice.extend_from_slice(&ByteConversion::to_bytes_le(&self.value()[3])); + byte_slice.extend(ByteConversion::to_bytes_le(&self.value()[1])); + byte_slice.extend(ByteConversion::to_bytes_le(&self.value()[2])); + byte_slice.extend(ByteConversion::to_bytes_le(&self.value()[3])); byte_slice }