Skip to content

Commit

Permalink
fix example-framework (#4588)
Browse files Browse the repository at this point in the history
* fix example-framework

* `cargo fmt`
  • Loading branch information
TornaxO7 authored Oct 28, 2023
1 parent 43b74f9 commit ad3094c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/common/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use winit::{
event::{self, KeyEvent, WindowEvent},
event_loop::{ControlFlow, EventLoop},
keyboard::{Key, NamedKey},
window::Window,
};

#[allow(dead_code)]
Expand Down Expand Up @@ -69,6 +70,7 @@ pub trait Example: 'static + Sized {
}

struct Setup {
_window: Window,
event_loop: EventLoop<()>,
instance: wgpu::Instance,
size: winit::dpi::PhysicalSize<u32>,
Expand Down Expand Up @@ -240,6 +242,7 @@ async fn setup<E: Example>(title: &str) -> Setup {
.expect("Unable to find a suitable GPU adapter!");

Setup {
_window: window,
event_loop,
instance,
size,
Expand All @@ -261,6 +264,7 @@ fn start<E: Example>(
adapter,
device,
queue,
..
}: Setup,
#[cfg(target_arch = "wasm32")] Setup {
event_loop,
Expand All @@ -271,6 +275,7 @@ fn start<E: Example>(
device,
queue,
offscreen_canvas_setup,
..
}: Setup,
) {
let mut config = surface
Expand Down

0 comments on commit ad3094c

Please sign in to comment.