Skip to content

Commit

Permalink
fix compile error with Rust 1.64
Browse files Browse the repository at this point in the history
As of rustc 1.64, Box::from_raw is #[must_use].
  • Loading branch information
yu-re-ka committed Oct 11, 2022
1 parent 6b68b80 commit 20ca621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libflux/flux/src/cffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub extern "C" fn flux_free_error(_err: Option<Box<ErrorHandle>>) {}
/// function is called twice on the same raw pointer.
#[no_mangle]
pub unsafe extern "C" fn flux_free_bytes(cstr: *mut c_char) {
Box::from_raw(cstr);
drop(Box::from_raw(cstr));
}

/// A buffer of flux source.
Expand Down

0 comments on commit 20ca621

Please sign in to comment.