From 20ca62138a0669f2760dd469ca41fc333e04b8f2 Mon Sep 17 00:00:00 2001 From: Yureka Date: Tue, 11 Oct 2022 16:42:37 +0200 Subject: [PATCH] fix compile error with Rust 1.64 As of rustc 1.64, Box::from_raw is #[must_use]. --- libflux/flux/src/cffi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libflux/flux/src/cffi.rs b/libflux/flux/src/cffi.rs index f3865b83ad..37e8d3bcb7 100644 --- a/libflux/flux/src/cffi.rs +++ b/libflux/flux/src/cffi.rs @@ -97,7 +97,7 @@ pub extern "C" fn flux_free_error(_err: Option>) {} /// 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.