From e3caa6837be3115808ba91a01785f39cec849115 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 30 Oct 2024 02:07:51 +0100 Subject: [PATCH] Prepare for follow-on change --- experiments/2024-10-30/src/render.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/experiments/2024-10-30/src/render.rs b/experiments/2024-10-30/src/render.rs index 922c73271..0eb07dd7d 100644 --- a/experiments/2024-10-30/src/render.rs +++ b/experiments/2024-10-30/src/render.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use winit::{ application::ApplicationHandler, event::WindowEvent, @@ -17,14 +19,16 @@ pub fn render(_: &Mesh) -> anyhow::Result<()> { } struct App { - window: Option, + window: Option>, } impl ApplicationHandler for App { fn resumed(&mut self, event_loop: &ActiveEventLoop) { - let window = event_loop - .create_window(WindowAttributes::default()) - .unwrap(); + let window = Arc::new( + event_loop + .create_window(WindowAttributes::default()) + .unwrap(), + ); self.window = Some(window); }