cargo fmt

This commit is contained in:
Raph Levien 2022-11-29 19:51:43 -08:00
parent 28816a027e
commit 375f71b46d

View file

@ -23,10 +23,7 @@ use piet_wgsl::{util::RenderContext, Renderer};
use winit::{event_loop::EventLoop, window::Window};
async fn run() {
use winit::{
dpi::LogicalSize,
window::WindowBuilder,
};
use winit::{dpi::LogicalSize, window::WindowBuilder};
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_inner_size(LogicalSize::new(1044, 800))
@ -37,10 +34,7 @@ async fn run() {
}
async fn run_wasm(event_loop: EventLoop<()>, window: Window) {
use winit::{
event::*,
event_loop::ControlFlow,
};
use winit::{event::*, event_loop::ControlFlow};
let render_cx = RenderContext::new().await.unwrap();
let size = window.inner_size();
let mut surface = render_cx.create_surface(&window, size.width, size.height);
@ -134,4 +128,4 @@ fn main() {
.expect("couldn't append canvas to document body");
wasm_bindgen_futures::spawn_local(run_wasm(event_loop, window));
}
}
}