mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-30 14:31:53 +00:00
Suppress deprecation warning on mem::uninitialized
This commit is contained in:
parent
bc7a85063d
commit
ce89adecc1
@ -620,6 +620,7 @@ impl Serialize for SystemTime {
|
||||
#[cfg(feature = "std")]
|
||||
macro_rules! serialize_display_bounded_length {
|
||||
($value:expr, $max:expr, $serializer:expr) => {{
|
||||
#[allow(deprecated)]
|
||||
let mut buffer: [u8; $max] = unsafe { mem::uninitialized() };
|
||||
let remaining_len = {
|
||||
let mut remaining = &mut buffer[..];
|
||||
|
Loading…
x
Reference in New Issue
Block a user