From 91b37d76f50fc2fb960244e7a44672c1b0764029 Mon Sep 17 00:00:00 2001 From: Richard Giliam Date: Fri, 10 May 2024 16:04:15 -0700 Subject: [PATCH] Address feedback; replace use of `byte_range` with `slice` since we don't need the ImmutableBuffer --- src/lazy/binary/raw/v1_1/value.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lazy/binary/raw/v1_1/value.rs b/src/lazy/binary/raw/v1_1/value.rs index 9b74b09f..d1b87e63 100644 --- a/src/lazy/binary/raw/v1_1/value.rs +++ b/src/lazy/binary/raw/v1_1/value.rs @@ -241,15 +241,15 @@ impl<'top> LazyRawBinaryValue_1_1<'top> { let value = match self.encoded_value.value_body_length { 8 => { let mut buffer = [0; 8]; - let val_bytes = self.input.slice(1, 8); - buffer[..8].copy_from_slice(val_bytes.bytes()); + let val_bytes = self.input.bytes_range(1, 8); + buffer[..8].copy_from_slice(val_bytes); f64::from_le_bytes(buffer) } 4 => { let mut buffer = [0; 4]; - let val_bytes = self.input.slice(1, 4); - buffer[..4].copy_from_slice(val_bytes.bytes()); + let val_bytes = self.input.bytes_range(1, 4); + buffer[..4].copy_from_slice(val_bytes); f32::from_le_bytes(buffer).into() }