refactor(nodelist): simplify destroying nodes

This commit is contained in:
Nova
2022-06-19 21:43:19 -04:00
parent bbaf95b79f
commit ca57131558

View File

@@ -17,9 +17,8 @@ impl LifeLinkedNodeList {
.read()
.iter()
.filter_map(|node| node.upgrade())
.filter_map(|node| node.get_client().zip(Some(node.get_path().to_string())))
.for_each(|(client, path)| {
client.scenegraph.remove_node(&path);
.for_each(|node| {
node.destroy();
});
self.nodes.write().clear();
}