Add comments explaining the unsafe impls and simplify the code, too

This commit is contained in:
Mark McCaskey
2019-09-17 18:35:12 -07:00
parent 83c3909b00
commit 9c205e05a2
6 changed files with 15 additions and 13 deletions

View File

@ -54,6 +54,7 @@ pub struct LocalBacking {
pub(crate) internals: Internals,
}
// Manually implemented because LocalBacking contains raw pointers directly
unsafe impl Send for LocalBacking {}
impl LocalBacking {
@ -463,6 +464,7 @@ pub struct ImportBacking {
pub(crate) vm_globals: BoxedMap<ImportedGlobalIndex, *mut vm::LocalGlobal>,
}
// manually implemented because ImportBacking contains raw pointers directly
unsafe impl Send for ImportBacking {}
impl ImportBacking {