use raw pointers instead of transmute to make miri happy

This commit is contained in:
Evan Almloff committed 2023-09-04 09:28:16 -05:00
1 parent cf04256395
commit cfc6887e34
4 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -371,7 +371,7 @@ impl VirtualDom {
// Loop through each dynamic attribute (in a depth first order) in this template before moving up to the template's parent.
while let Some(el_ref) = parent_path {
// safety: we maintain references of all vnodes in the element slab
let template = el_ref.template;
let template = unsafe { &*el_ref.template };
let node_template = template.template.get();
let target_path = el_ref.path;
@@ -421,7 +421,7 @@ impl VirtualDom {
// Otherwise, we just call the listener on the target element
if let Some(el_ref) = parent_path {
// safety: we maintain references of all vnodes in the element slab
let template = el_ref.template;
let template = unsafe { &*el_ref.template };
let node_template = template.template.get();
let target_path = el_ref.path;