1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Clippy & fmt

This commit is contained in:
lucasmerlin
2026-03-23 15:45:28 +01:00
parent 3d95468f6d
commit b1a388e12e
3 changed files with 8 additions and 4 deletions

View File

@@ -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<dyn Fn(&wgpu::CurrentSurfaceTexture) -> SurfaceErrorAction + Send + Sync>,
pub on_surface_status:
Arc<dyn Fn(&wgpu::CurrentSurfaceTexture) -> SurfaceErrorAction + Send + Sync>,
}
#[test]

View File

@@ -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
}

View File

@@ -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);
}