diff --git a/wgpu/src/widget/canvas/drawable.rs b/wgpu/src/widget/canvas/drawable.rs index 32258b71..5209fa6f 100644 --- a/wgpu/src/widget/canvas/drawable.rs +++ b/wgpu/src/widget/canvas/drawable.rs @@ -25,3 +25,12 @@ where T::draw(self, frame) } } + +impl Drawable for &[T] +where + T: Drawable, +{ + fn draw(&self, frame: &mut Frame) { + self.iter().for_each(|drawable| drawable.draw(frame)); + } +}