mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 23:05:43 +00:00
Fix borrow error
This commit is contained in:
parent
41643eca9d
commit
37646fd1bb
@ -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: (),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user