Skip to content

Commit

Permalink
rust: Drop box ptr
Browse files Browse the repository at this point in the history
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.

rust-lang/rust#99270
  • Loading branch information
rwmjones committed Sep 29, 2022
1 parent 9418ec5 commit 6836e4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>));
}
}

Expand Down

0 comments on commit 6836e4c

Please sign in to comment.