diff options
author | Daniel Xu <accounts@dxuuu.xyz> | 2021-05-11 10:46:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 17:46:27 +0200 |
commit | e6684dc5c56d0283b9c14b34f68d445e9d5a580f (patch) | |
tree | 024daaec5497f25d60fdc39f3efe1fd76ed0c397 /src/codegen/impl_debug.rs | |
parent | 4116b701f5c86f4197824703d935283ca644c21b (diff) |
Zero out padding in custom Default trait implementations (#2051)
* Zero out padding in custom Default trait implementations
Previously, we were using `std::mem::zeroed()` which unfortunately does
not necessarily zero out padding. It'd be better if the padding is
zeroed out because some libraries are sensitive to non-zero'd out bytes,
especially when forward/backward compatability is involved.
This commit ensures all bytes are zeroed out in custom Default trait
implementations.
Diffstat (limited to 'src/codegen/impl_debug.rs')
0 files changed, 0 insertions, 0 deletions