fix clippy

This commit is contained in:
Evan Almloff committed 2023-08-15 10:37:27 -05:00
1 parent 9c2e713dae
commit 0d773eac63
1 file changed
+5 -6
+5 -6
View File
@@ -57,13 +57,12 @@ impl DioxusState {
node.insert(ElementIdComponent(element_id));
if self.node_id_mapping.len() <= element_id.0 {
self.node_id_mapping.resize(element_id.0 + 1, None);
} else {
if let Some(mut node) =
self.node_id_mapping[element_id.0].and_then(|id| node.real_dom_mut().get_mut(id))
{
node.remove();
}
} else if let Some(mut node) =
self.node_id_mapping[element_id.0].and_then(|id| node.real_dom_mut().get_mut(id))
{
node.remove();
}
self.node_id_mapping[element_id.0] = Some(node_id);
}