Bug 1789524 - Use drop(Box::from_raw). r=platform-i18n-reviewers,dminor

As of rustc 1.64, Box::from_raw is #[must_use].

Differential Revision: https://phabricator.services.mozilla.com/D156617
This commit is contained in:
Mike Hommey 2022-09-07 20:48:02 +00:00
parent 9a7bb328c1
commit 0e59ca6e3c

View File

@ -466,7 +466,7 @@ pub unsafe extern "C" fn localization_addref(loc: &LocalizationRc) -> nsrefcnt {
pub unsafe extern "C" fn localization_release(loc: *const LocalizationRc) -> nsrefcnt {
let rc = (*loc).refcnt.dec();
if rc == 0 {
Box::from_raw(loc as *const _ as *mut LocalizationRc);
std::mem::drop(Box::from_raw(loc as *const _ as *mut LocalizationRc));
}
rc
}