Skip to content

Commit 9d5ef36

Browse files
committed
chore: add unsafe blocks required in Rust 2024.
In Rust 2024 marking a function as `unsafe` only indicates that this function must be used within an unsafe block, but doesn't allow the function itself to call unsafe function without explicitly using an unsafe block.
1 parent 4880f67 commit 9d5ef36

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

lib/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,7 @@ mod utils {
173173
///
174174
/// [wasmtime]: https://wasmtime.dev/
175175
pub unsafe fn finalize() {
176-
wasm::free_engine();
176+
unsafe {
177+
wasm::free_engine();
178+
}
177179
}

lib/src/wasm/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,9 @@ pub(crate) unsafe fn free_engine() {
830830
))]
831831
{
832832
#[allow(static_mut_refs)]
833-
ENGINE.take().unwrap().unload_process_handlers()
833+
unsafe {
834+
ENGINE.take().unwrap().unload_process_handlers()
835+
}
834836
}
835837
}
836838

0 commit comments

Comments
 (0)