summaryrefslogtreecommitdiff
path: root/alligator_render/examples
diff options
context:
space:
mode:
Diffstat (limited to 'alligator_render/examples')
-rw-r--r--alligator_render/examples/black.rs2
-rw-r--r--alligator_render/examples/bmp.rs2
-rw-r--r--alligator_render/examples/bunnymark.rs3
3 files changed, 4 insertions, 3 deletions
diff --git a/alligator_render/examples/black.rs b/alligator_render/examples/black.rs
index 622429f..b8846ca 100644
--- a/alligator_render/examples/black.rs
+++ b/alligator_render/examples/black.rs
@@ -17,5 +17,5 @@ fn main() {
let renderer = Renderer::new(&config).unwrap();
println!("Startup time: {:?}", start.elapsed());
- renderer.run(Box::leak(Box::new(update)));
+ renderer.run(update);
}
diff --git a/alligator_render/examples/bmp.rs b/alligator_render/examples/bmp.rs
index 23842a9..b8ce00c 100644
--- a/alligator_render/examples/bmp.rs
+++ b/alligator_render/examples/bmp.rs
@@ -84,5 +84,5 @@ fn main() {
..Default::default()
});
- renderer.run(Box::leak(Box::new(update)));
+ renderer.run(update);
}
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));
}