mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-25 16:49:29 -05:00
silence warning for unused 'must use' (#1269)
this warning only occurs when using the library as a dependency. warning: unused return value of `Box::<T>::from_raw` that must be used --> /rusty_v8/src/scope.rs:1092:16 | 1092 | unsafe { Box::from_raw(root) }; | ^^^^^^^^^^^^^^^^^^^ | = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` = note: `#[warn(unused_must_use)]` on by default
This commit is contained in:
parent
ca83ce53ba
commit
e2c6541ea3
1 changed files with 3 additions and 1 deletions
|
@ -1089,7 +1089,9 @@ pub(crate) mod data {
|
|||
/// This function should be called only when an Isolate is being disposed.
|
||||
pub(crate) fn drop_root(isolate: &mut Isolate) {
|
||||
let root = Self::get_root_mut(isolate);
|
||||
unsafe { Box::from_raw(root) };
|
||||
unsafe {
|
||||
let _ = Box::from_raw(root);
|
||||
};
|
||||
isolate.set_current_scope_data(None);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue