From 11077150cbc909e414cf5b27f18d02629e6b01da Mon Sep 17 00:00:00 2001 From: Micha White Date: Thu, 20 Oct 2022 23:19:00 -0400 Subject: Made the run function generic --- alligator_render/examples/bunnymark.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alligator_render/examples/bunnymark.rs') diff --git a/alligator_render/examples/bunnymark.rs b/alligator_render/examples/bunnymark.rs index 759d725..a343ce5 100644 --- a/alligator_render/examples/bunnymark.rs +++ b/alligator_render/examples/bunnymark.rs @@ -121,6 +121,7 @@ fn main() { .textures_mut() .load_from_memory(bunny, ImageFormat::Farbfeld) .unwrap(); + let state = Box::leak(Box::new(State::new(texture_id))); - renderer.run(Box::leak(Box::new(|r| state.update(r)))); + renderer.run(|r| state.update(r)); } -- cgit v1.2.3