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

@@ -401,7 +401,7 @@ impl From<Image<Color>> for Image<SRGBA8> {
impl From<ImageFrameTable<Color>> for ImageFrameTable<SRGBA8> {
fn from(image_frame_table: ImageFrameTable<Color>) -> Self {
let mut result_table = ImageFrameTable::<SRGBA8>::empty();
let mut result_table = ImageFrameTable::<SRGBA8>::default();
for image_frame_instance in image_frame_table.instance_iter() {
result_table.push(Instance {