From f0f5101c8341291442992528d7f63ee9d37ad7fd Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 30 Dec 2021 11:58:00 +0000 Subject: [PATCH] Merge pull request #73 from eagletmt/explicit-drop Add explicit drop() to avoid warning since Rust 1.57.0 --- --- a/bindings/jsonnet/src/import.rs +++ b/bindings/jsonnet/src/import.rs @@ -49,8 +49,8 @@ }; // Release memory occipied by arguments passed unsafe { - CString::from_raw(base); - CString::from_raw(rel); + drop(CString::from_raw(base)); + drop(CString::from_raw(rel)); } let result_raw = unsafe { CStr::from_ptr(result_ptr) }; let result_str = result_raw.to_str().unwrap(); @@ -64,7 +64,7 @@ let found_here_raw = unsafe { CStr::from_ptr(found_here) }; let found_here_buf = PathBuf::from(found_here_raw.to_str().unwrap()); unsafe { - CString::from_raw(found_here); + drop(CString::from_raw(found_here)); } let mut out = self.out.borrow_mut(); -- gitstuff