From 117222d3e40d5abc51ada08a7be8754d68135dc6 Mon Sep 17 00:00:00 2001 From: zachs18 <8355914+zachs18@users.noreply.github.com> Date: Wed, 11 Jan 2023 01:24:05 -0600 Subject: [PATCH] Implement AnyBitPattern for MaybeUninit where T: AnyBitPattern. (#160) --- src/anybitpattern.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/anybitpattern.rs b/src/anybitpattern.rs index 3a55e62..c35a9a7 100644 --- a/src/anybitpattern.rs +++ b/src/anybitpattern.rs @@ -54,3 +54,7 @@ pub unsafe trait AnyBitPattern: } unsafe impl AnyBitPattern for T {} + +#[cfg(feature = "zeroable_maybe_uninit")] +unsafe impl AnyBitPattern for core::mem::MaybeUninit where T: AnyBitPattern +{}