Here's the bug https://github.com/asomers/mockall/issues/414

On Thu, Sep 29, 2022 at 9:56 AM alan somers <asom...@gmail.com> wrote:
>
> This change is correct.  You can consider it reviewed by me and commit
> it.  As for the warning from Mockall, that's a bug in Mockall.  I'll
> fix it.
>
> On Thu, Sep 29, 2022 at 8:21 AM Richard W.M. Jones <rjo...@redhat.com> wrote:
> >
> > Because of this recent change to rust, our close function warned that
> > we calculate Box::from_raw but never use it.  I added the suggested
> > call to drop() around the function.
> >
> > https://github.com/rust-lang/rust/pull/99270
> > ---
> >  plugins/rust/src/lib.rs | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/plugins/rust/src/lib.rs b/plugins/rust/src/lib.rs
> > index 69be36fb2..128334ef2 100644
> > --- a/plugins/rust/src/lib.rs
> > +++ b/plugins/rust/src/lib.rs
> > @@ -368,7 +368,7 @@ mod ffi {
> >
> >      pub(super) extern fn close(selfp: *mut c_void) {
> >          unsafe {
> > -            Box::from_raw(selfp as *mut Box<dyn Server>);
> > +            drop(Box::from_raw(selfp as *mut Box<dyn Server>));
> >          }
> >      }
> >
> > --
> > 2.37.0.rc2
> >

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to