According to the Yielder doc it should be safe to copy (but not safe to Send), however I don't see any way to make an owned copy of Yielder in the current API. Am I missing something? Currently I'm doing this which seems to work fine, but is not desirable for obvious reasons 😄
let y = unsafe {
let mut y_copy: MaybeUninit<Yielder<bool, bool>> = MaybeUninit::uninit();
std::ptr::copy_nonoverlapping(
y as *const Yielder<bool, bool>,
y_copy.as_mut_ptr(),
1,
);
y_copy.assume_init()
};
According to the Yielder doc it should be safe to copy (but not safe to Send), however I don't see any way to make an owned copy of Yielder in the current API. Am I missing something? Currently I'm doing this which seems to work fine, but is not desirable for obvious reasons 😄