On Fri, Jun 05, 2026 at 04:54:55PM +0200, Alice Ryhl wrote:
[..]
> >
> > [Cc Alice]
> >
> > I fixed this locally by:
> >
> > fn into_foreign(self) -> *mut c_void {
> > let ptr = self.0.as_ptr().cast();
> >
> > // FORGET: Leaking it as a pointer, the caller is responsible to
> > free it or unleak it by
> > // from_foreign().
> > core::mem::forget(self);
> >
> > ptr
> > }
>
> I prefer to avoid use core::mem::forget.
>
> ManuallyDrop(self).0.as_ptr().cast()
> Sounds good ;-) Regards, Boqun > Alice
