Fix mistake when deleting submissions

This commit is contained in:
Pierre Krieger 2016-03-28 19:42:26 +02:00
parent f774878e69
commit 900fe5ace3
2 changed files with 2 additions and 2 deletions

View File

@ -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());
```

View File

@ -218,7 +218,7 @@ fn main() {
let mut submissions: Vec<Arc<vulkano::command_buffer::Submission>> = 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());