mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Clippy & fmt
This commit is contained in:
@@ -309,7 +309,8 @@ pub struct WgpuConfiguration {
|
|||||||
/// does not return [`wgpu::CurrentSurfaceTexture::Success`]. For
|
/// does not return [`wgpu::CurrentSurfaceTexture::Success`]. For
|
||||||
/// [`wgpu::CurrentSurfaceTexture::Suboptimal`], egui automatically reconfigures the
|
/// [`wgpu::CurrentSurfaceTexture::Suboptimal`], egui automatically reconfigures the
|
||||||
/// surface and uses the frame — the callback is not invoked in that case.
|
/// 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]
|
#[test]
|
||||||
|
|||||||
@@ -137,7 +137,10 @@ impl WgpuSetup {
|
|||||||
flags: desc.flags,
|
flags: desc.flags,
|
||||||
backend_options: desc.backend_options.clone(),
|
backend_options: desc.backend_options.clone(),
|
||||||
memory_budget_thresholds: desc.memory_budget_thresholds,
|
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
|
wgpu::util::new_instance_with_webgpu_detection(descriptor).await
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -506,8 +506,8 @@ impl Painter {
|
|||||||
Self::configure_surface(surface_state, render_state, &self.configuration);
|
Self::configure_surface(surface_state, render_state, &self.configuration);
|
||||||
frame
|
frame
|
||||||
}
|
}
|
||||||
ref other => {
|
other => {
|
||||||
match (*self.configuration.on_surface_status)(other) {
|
match (*self.configuration.on_surface_status)(&other) {
|
||||||
SurfaceErrorAction::RecreateSurface => {
|
SurfaceErrorAction::RecreateSurface => {
|
||||||
Self::configure_surface(surface_state, render_state, &self.configuration);
|
Self::configure_surface(surface_state, render_state, &self.configuration);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user