From b1a388e12e1c51a2c4f4e4d233598d7a5c21b957 Mon Sep 17 00:00:00 2001 From: lucasmerlin Date: Mon, 23 Mar 2026 15:45:28 +0100 Subject: [PATCH] Clippy & fmt --- crates/egui-wgpu/src/lib.rs | 3 ++- crates/egui-wgpu/src/setup.rs | 5 ++++- crates/egui-wgpu/src/winit.rs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/egui-wgpu/src/lib.rs b/crates/egui-wgpu/src/lib.rs index 2992d3583..c981027db 100644 --- a/crates/egui-wgpu/src/lib.rs +++ b/crates/egui-wgpu/src/lib.rs @@ -309,7 +309,8 @@ pub struct WgpuConfiguration { /// does not return [`wgpu::CurrentSurfaceTexture::Success`]. For /// [`wgpu::CurrentSurfaceTexture::Suboptimal`], egui automatically reconfigures the /// surface and uses the frame — the callback is not invoked in that case. - pub on_surface_status: Arc SurfaceErrorAction + Send + Sync>, + pub on_surface_status: + Arc SurfaceErrorAction + Send + Sync>, } #[test] diff --git a/crates/egui-wgpu/src/setup.rs b/crates/egui-wgpu/src/setup.rs index 19e385ea2..9d83d4380 100644 --- a/crates/egui-wgpu/src/setup.rs +++ b/crates/egui-wgpu/src/setup.rs @@ -137,7 +137,10 @@ impl WgpuSetup { flags: desc.flags, backend_options: desc.backend_options.clone(), memory_budget_thresholds: desc.memory_budget_thresholds, - display: create_new.display_handle.as_ref().map(|handle| handle.clone_for_wgpu()), + display: create_new + .display_handle + .as_ref() + .map(|handle| handle.clone_for_wgpu()), }; wgpu::util::new_instance_with_webgpu_detection(descriptor).await } diff --git a/crates/egui-wgpu/src/winit.rs b/crates/egui-wgpu/src/winit.rs index aa3eecd7c..b51c3e5cd 100644 --- a/crates/egui-wgpu/src/winit.rs +++ b/crates/egui-wgpu/src/winit.rs @@ -506,8 +506,8 @@ impl Painter { Self::configure_surface(surface_state, render_state, &self.configuration); frame } - ref other => { - match (*self.configuration.on_surface_status)(other) { + other => { + match (*self.configuration.on_surface_status)(&other) { SurfaceErrorAction::RecreateSurface => { Self::configure_surface(surface_state, render_state, &self.configuration); }