Skip to content

Commit

Permalink
capi: fix 'unused return value' warnings from cargo check
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Jul 14, 2022
1 parent fc9ee6a commit 19b05d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions regex-capi/src/rure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ ffi_fn! {
fn rure_iter_capture_names_free(it: *mut IterCaptureNames) {
unsafe {
let it = &mut *it;
while let Some(ptr) = it.name_ptrs.pop(){
CString::from_raw(ptr);
while let Some(ptr) = it.name_ptrs.pop() {
drop(CString::from_raw(ptr));
}
Box::from_raw(it);
}
Expand Down Expand Up @@ -624,6 +624,6 @@ fn rure_escape(

ffi_fn! {
fn rure_cstring_free(s: *mut c_char) {
unsafe { CString::from_raw(s); }
unsafe { drop(CString::from_raw(s)); }
}
}

0 comments on commit 19b05d8

Please sign in to comment.