This is an automated email from the ASF dual-hosted git repository. kriskras99 pushed a commit to branch fix/small_things in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit bab8998083da17ba07542cf9c9c7219a68ed9294 Author: Kriskras99 <[email protected]> AuthorDate: Wed Feb 25 21:28:06 2026 +0100 fix: `deserialize_big_decimal` doesn't need a `Vec<u8>` --- avro/src/bigdecimal.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/avro/src/bigdecimal.rs b/avro/src/bigdecimal.rs index b887535..7a6a379 100644 --- a/avro/src/bigdecimal.rs +++ b/avro/src/bigdecimal.rs @@ -47,8 +47,7 @@ pub(crate) fn serialize_big_decimal(decimal: &BigDecimal) -> AvroResult<Vec<u8>> Ok(final_buffer) } -pub(crate) fn deserialize_big_decimal(bytes: &Vec<u8>) -> AvroResult<BigDecimal> { - let mut bytes: &[u8] = bytes.as_slice(); +pub(crate) fn deserialize_big_decimal(mut bytes: &[u8]) -> AvroResult<BigDecimal> { let mut big_decimal_buffer = match decode_len(&mut bytes) { Ok(size) => vec![0u8; size], Err(err) => return Err(Details::BigDecimalLen(Box::new(err)).into()),
