From 900fe5ace356c74ec152c77316caa225d922e6dc Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 28 Mar 2016 19:42:26 +0200 Subject: [PATCH] Fix mistake when deleting submissions --- FEATURES.md | 2 +- vulkano/examples/teapot.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FEATURES.md b/FEATURES.md index 9908accd..49314623 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -77,5 +77,5 @@ If you keep pushing submission objects in your `Vec` you will ultimately run out Cleaning the objects that are no longer needed can be done like this: ```rust -submissions.retain(|s| !s.destroying_would_block()); +submissions.retain(|s| s.destroying_would_block()); ``` diff --git a/vulkano/examples/teapot.rs b/vulkano/examples/teapot.rs index 1b750103..da02ce4c 100644 --- a/vulkano/examples/teapot.rs +++ b/vulkano/examples/teapot.rs @@ -218,7 +218,7 @@ fn main() { let mut submissions: Vec> = Vec::new(); loop { - submissions.retain(|s| !s.destroying_would_block()); + submissions.retain(|s| s.destroying_would_block()); let image_num = swapchain.acquire_next_image(1000000).unwrap(); submissions.push(vulkano::command_buffer::submit(&command_buffers[image_num], &queue).unwrap());