Fix build failure due to rust-lang/rust PR 99413

This commit is contained in:
Frank Steffahn 2022-08-16 18:36:16 +02:00 committed by Jim Blandy
parent 0084d68c60
commit 18071599a7

View File

@ -1483,6 +1483,7 @@ impl<B: GfxBackend> Device<B> {
// `BTreeMap` has ordered bindings as keys, which allows us to coalesce
// the descriptor writes into a single transaction.
let mut desc_set; // early declaration so it's dropped after write_map
let mut write_map = BTreeMap::new();
let mut used_buffer_ranges = Vec::new();
for entry in desc.entries.iter() {
@ -1776,7 +1777,7 @@ impl<B: GfxBackend> Device<B> {
self.desc_allocator
.lock()
.allocate(&self.raw, &layout.raw, &layout.desc_count, 1)?;
let mut desc_set = desc_sets.pop().unwrap();
desc_set = desc_sets.pop().unwrap();
// Set the descriptor set's label for easier debugging.
if let Some(label) = desc.label.as_ref() {