Avoid a warning by explicitly calling drop.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
(cherry picked from commit 4f7d15508f)
This commit is contained in:
Daira Hopwood 2022-01-09 23:54:35 +00:00
parent fe7b87a96c
commit cfa4590c75
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ pub extern "C" fn zip339_free_phrase(phrase: *const c_char) {
if !phrase.is_null() {
unsafe {
// It is correct to cast away const here; the memory is not actually immutable.
CString::from_raw(phrase as *mut c_char);
drop(CString::from_raw(phrase as *mut c_char));
}
}
}