diff --git a/src/layouts.rs b/src/layouts.rs index e66ce15..5c5a5b3 100644 --- a/src/layouts.rs +++ b/src/layouts.rs @@ -56,7 +56,7 @@ unsafe impl PipelineLayoutDesc for FragLayout { self.layout_data.num_sets } fn num_bindings_in_set(&self, set: usize) -> Option { - self.layout_data.num_bindings.get(&set).copied() + self.layout_data.num_bindings.get(&set).map(|&b|b) } fn descriptor(&self, set: usize, binding: usize) -> Option { self.layout_data.descriptions.get(&set) @@ -123,7 +123,7 @@ unsafe impl PipelineLayoutDesc for VertLayout { self.layout_data.num_sets } fn num_bindings_in_set(&self, set: usize) -> Option { - self.layout_data.num_bindings.get(&set).copied() + self.layout_data.num_bindings.get(&set).map(|&b|b) } fn descriptor(&self, set: usize, binding: usize) -> Option { self.layout_data.descriptions.get(&set)