Skip to content

Commit 6208809

Browse files
committed
deserialize decimal128 into zeroed memory
1 parent 58adf73 commit 6208809

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/de/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ fn read_f128<R: Read + ?Sized>(reader: &mut R) -> Result<Decimal128> {
159159
#[cfg(feature = "decimal128")]
160160
#[inline]
161161
fn read_f128<R: Read + ?Sized>(reader: &mut R) -> Result<Decimal128> {
162-
use std::mem;
163-
164-
let mut local_buf: [u8; 16] = unsafe { mem::MaybeUninit::uninit().assume_init() };
162+
let mut local_buf = [0u8; 16];
165163
reader.read_exact(&mut local_buf)?;
166164
let val = unsafe { Decimal128::from_raw_bytes_le(local_buf) };
167165
Ok(val)

0 commit comments

Comments
 (0)