Initialize a `MaybeUninit ` TODO: Replace calls to this function with https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.write once it is stable.
(dst: &mut std::mem::MaybeUninit<T>, val: T)
| 112 | /// https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.write |
| 113 | /// once it is stable. |
| 114 | pub(crate) fn initialize<T>(dst: &mut std::mem::MaybeUninit<T>, val: T) { |
| 115 | unsafe { |
| 116 | std::ptr::write(dst.as_mut_ptr(), val); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | /// Helper for running a C-defined finalizer over some data when the Rust |
| 121 | /// structure is dropped. |
no test coverage detected