diff --git a/examples/with_winit/src/lib.rs b/examples/with_winit/src/lib.rs index 16d48f9..d27ae6a 100644 --- a/examples/with_winit/src/lib.rs +++ b/examples/with_winit/src/lib.rs @@ -516,7 +516,10 @@ pub fn main() -> Result<()> { web_sys::window() .and_then(|win| win.document()) .and_then(|doc| doc.body()) - .and_then(|body| body.append_child(&web_sys::Element::from(canvas.clone())).ok()) + .and_then(|body| { + body.append_child(&web_sys::Element::from(canvas.clone())) + .ok() + }) .expect("couldn't append canvas to document body"); _ = web_sys::HtmlElement::from(canvas).focus(); wasm_bindgen_futures::spawn_local(async move {