Skip to content

Commit cd358b8

Browse files
committed
Revert "deserialize decimal128 into zeroed memory"
This reverts commit 6208809.
1 parent 1fff644 commit cd358b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/de/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ 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-
let mut local_buf = [0u8; 16];
162+
use std::mem;
163+
164+
let mut local_buf: [u8; 16] = unsafe { mem::MaybeUninit::uninit().assume_init() };
163165
reader.read_exact(&mut local_buf)?;
164166
let val = unsafe { Decimal128::from_raw_bytes_le(local_buf) };
165167
Ok(val)

0 commit comments

Comments
 (0)