Replace Instances<T>::empty() with Instances<T>::default() and make it return an empty table for vector data instead of one empty row (#2689)

Make Instances<T>::default() return an empty table for everything, even vector, and replace ::empty() with ::default()
This commit is contained in:
Keavon Chambers
2025-06-04 21:00:21 -07:00
committed by GitHub
parent cb4289169d
commit 2696abc6b3
18 changed files with 110 additions and 115 deletions

View File

@@ -294,10 +294,7 @@ impl NodeRuntime {
Self::process_graphic_element(&mut self.thumbnail_renders, parent_network_node_id, &io.output, responses, update_thumbnails)
// Insert the vector modify if we are dealing with vector data
} else if let Some(record) = introspected_data.downcast_ref::<IORecord<Context, VectorDataTable>>() {
let default = Instance {
instance: VectorData::empty(),
..Default::default()
};
let default = Instance::default();
self.vector_modify.insert(
parent_network_node_id,
record.output.instance_ref_iter().next().unwrap_or_else(|| default.to_instance_ref()).instance.clone(),