Fix borrow error

This commit is contained in:
Pierre Krieger 2016-12-17 14:54:22 +01:00
parent 41643eca9d
commit 37646fd1bb

View File

@ -137,10 +137,12 @@ impl<L> SimpleDescriptorSetBuilder<L, ()> where L: PipelineLayoutRef {
pub fn new(layout: L, set_id: usize) -> SimpleDescriptorSetBuilder<L, ()> {
assert!(layout.desc().num_sets() > set_id);
let cap = layout.desc().num_bindings_in_set(set_id).unwrap_or(0);
SimpleDescriptorSetBuilder {
layout: layout,
set_id: set_id,
writes: Vec::with_capacity(layout.desc().num_bindings_in_set(set_id).unwrap_or(0)),
writes: Vec::with_capacity(cap),
resources: (),
}
}