From 090262c7dbf1c2db39d8d5d0dc251129225f3b73 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 25 Nov 2024 22:57:36 +0100 Subject: [PATCH] Prepare for follow-on change --- experiments/2024-10-30/src/render/geometry.rs | 7 ++----- experiments/2024-10-30/src/render/renderer.rs | 2 +- experiments/2024-10-30/src/render/text.rs | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/experiments/2024-10-30/src/render/geometry.rs b/experiments/2024-10-30/src/render/geometry.rs index a5a3f9378..731dca734 100644 --- a/experiments/2024-10-30/src/render/geometry.rs +++ b/experiments/2024-10-30/src/render/geometry.rs @@ -15,7 +15,7 @@ pub struct Geometry { } impl Geometry { - pub fn vertices(device: &wgpu::Device, operation: &impl Operation) -> Self { + pub fn vertices(device: &wgpu::Device, operation: &dyn Operation) -> Self { let mut mesh_vertices = Vec::new(); operation.vertices(&mut mesh_vertices); @@ -51,10 +51,7 @@ impl Geometry { } impl Geometry { - pub fn triangles( - device: &wgpu::Device, - operation: &impl Operation, - ) -> Self { + pub fn triangles(device: &wgpu::Device, operation: &dyn Operation) -> Self { let mut mesh_triangles = Vec::new(); operation.triangles(&mut mesh_triangles); diff --git a/experiments/2024-10-30/src/render/renderer.rs b/experiments/2024-10-30/src/render/renderer.rs index aa7ccdfb0..828f5844e 100644 --- a/experiments/2024-10-30/src/render/renderer.rs +++ b/experiments/2024-10-30/src/render/renderer.rs @@ -89,7 +89,7 @@ impl Renderer { pub fn render( &mut self, - selected_operation: &impl Operation, + selected_operation: &dyn Operation, all_operations: &OpsLog, ) -> anyhow::Result<()> { let vertices = Geometry::vertices(&self.device, selected_operation); diff --git a/experiments/2024-10-30/src/render/text.rs b/experiments/2024-10-30/src/render/text.rs index 71ca37979..ea51cc777 100644 --- a/experiments/2024-10-30/src/render/text.rs +++ b/experiments/2024-10-30/src/render/text.rs @@ -65,7 +65,7 @@ impl TextRenderer { device: &wgpu::Device, queue: &wgpu::Queue, surface_config: &wgpu::SurfaceConfiguration, - _selected_operation: &impl Operation, + _selected_operation: &dyn Operation, _all_operations: &OpsLog, render_pass: &mut wgpu::RenderPass, ) -> anyhow::Result<()> {