Clean up code by using Iterator::collect() when constructing instance tables (#2918)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run

* instances: `Iterator::collect()` instances

* instances: adjust nodes to use iterators

* fix warnings on master

* Bump MSRV

* Port the remaining usages

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Firestar99 2025-07-23 07:51:40 +02:00 committed by GitHub
parent 032f9bdf72
commit 890da6a3c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 964 additions and 985 deletions

View file

@ -292,15 +292,12 @@ where
let rasterized = context.get_image_data(0., 0., resolution.x as f64, resolution.y as f64).unwrap();
let mut result = RasterDataTable::default();
let image = Image::from_image_data(&rasterized.data().0, resolution.x as u32, resolution.y as u32);
result.push(Instance {
RasterDataTable::new_instance(Instance {
instance: Raster::new_cpu(image),
transform: footprint.transform,
..Default::default()
});
result
})
}
#[node_macro::node(category(""))]