From ad3094c126e191d879a6d8684d254e13d4f8cb09 Mon Sep 17 00:00:00 2001 From: TornaxO7 Date: Sat, 28 Oct 2023 08:40:33 +0200 Subject: [PATCH] fix example-framework (#4588) * fix example-framework * `cargo fmt` --- examples/common/src/framework.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/common/src/framework.rs b/examples/common/src/framework.rs index 094d5dc59..67da84a56 100644 --- a/examples/common/src/framework.rs +++ b/examples/common/src/framework.rs @@ -12,6 +12,7 @@ use winit::{ event::{self, KeyEvent, WindowEvent}, event_loop::{ControlFlow, EventLoop}, keyboard::{Key, NamedKey}, + window::Window, }; #[allow(dead_code)] @@ -69,6 +70,7 @@ pub trait Example: 'static + Sized { } struct Setup { + _window: Window, event_loop: EventLoop<()>, instance: wgpu::Instance, size: winit::dpi::PhysicalSize, @@ -240,6 +242,7 @@ async fn setup(title: &str) -> Setup { .expect("Unable to find a suitable GPU adapter!"); Setup { + _window: window, event_loop, instance, size, @@ -261,6 +264,7 @@ fn start( adapter, device, queue, + .. }: Setup, #[cfg(target_arch = "wasm32")] Setup { event_loop, @@ -271,6 +275,7 @@ fn start( device, queue, offscreen_canvas_setup, + .. }: Setup, ) { let mut config = surface