mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
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:
parent
9a7bb328c1
commit
0e59ca6e3c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user