mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Clippy & fmt
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user