ash-rs / ash

Vulkan bindings for Rust
Apache License 2.0
1.75k stars 186 forks source link

Add `extend_next` method to extendable structs #907

Open Rua opened 2 months ago

Rua commented 2 months ago

Like the extend method of many standard containers, this would take an iterator of extension structs and add them all:

pub fn extend_next(
    self,
    next: impl IntoIterator<Item = &'a mut dyn ExtendsWhatever>,
) -> Self
Ralith commented 2 months ago

That seems like a lot of extra generated code for something that could be addressed with a three-line for loop on the caller's side.