git.delta.rocks / jrsonnet / refs/commits / f0f5101c8341

difftreelog

Merge pull request #73 from eagletmt/explicit-drop

Yaroslav Bolyukin2021-12-30parents: #8e60cf1 #d696bff.patch.diff
in: master
Add explicit drop() to avoid warning since Rust 1.57.0

1 file changed

modifiedbindings/jsonnet/src/import.rsdiffbeforeafterboth
49 };49 };
50 // Release memory occipied by arguments passed50 // Release memory occipied by arguments passed
51 unsafe {51 unsafe {
52 CString::from_raw(base);52 drop(CString::from_raw(base));
53 CString::from_raw(rel);53 drop(CString::from_raw(rel));
54 }54 }
55 let result_raw = unsafe { CStr::from_ptr(result_ptr) };55 let result_raw = unsafe { CStr::from_ptr(result_ptr) };
56 let result_str = result_raw.to_str().unwrap();56 let result_str = result_raw.to_str().unwrap();
64 let found_here_raw = unsafe { CStr::from_ptr(found_here) };64 let found_here_raw = unsafe { CStr::from_ptr(found_here) };
65 let found_here_buf = PathBuf::from(found_here_raw.to_str().unwrap());65 let found_here_buf = PathBuf::from(found_here_raw.to_str().unwrap());
66 unsafe {66 unsafe {
67 CString::from_raw(found_here);67 drop(CString::from_raw(found_here));
68 }68 }
6969
70 let mut out = self.out.borrow_mut();70 let mut out = self.out.borrow_mut();