Paolo Bonzini <pbonz...@redhat.com> writes:
> MaybeUninit::zeroed() is handy, but it introduces unsafe (and has a > pretty heavy syntax in general). Introduce a trait that provides the > same functionality while staying within safe Rust. > > In addition, MaybeUninit::zeroed() is not available as a "const" > function until Rust 1.75.0, so this also prepares for having handwritten > implementations of the trait until we can assume that version. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Junjie Mao <junjie....@hotmail.com> -- Best Regards Junjie Mao