Skip to content

Commit 6983c3b

Browse files
authored
Remove SwapChains::destroy_all (#346)
This API is a bit dangerous because it assumes that every `SwapChain` in the collection has the same device. I think it would be better to remove it entire to avoid misuse. Signed-off-by: Martin Robinson <[email protected]>
1 parent 66c622b commit 6983c3b

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/chains.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -756,19 +756,6 @@ where
756756
Ok(())
757757
}
758758

759-
/// Destroy all the swap chains for a particular producer context.
760-
/// Called by the producer.
761-
pub fn destroy_all(&self, device: &Device, context: &mut Device::Context) -> Result<(), Error> {
762-
if let Some(mut ids) = self.ids().remove(&device.context_id(context)) {
763-
for id in ids.drain() {
764-
if let Some(swap_chain) = self.table_mut().remove(&id) {
765-
swap_chain.destroy(device, context)?;
766-
}
767-
}
768-
}
769-
Ok(())
770-
}
771-
772759
/// Iterate over all the swap chains for a particular producer context.
773760
/// Called by the producer.
774761
pub fn iter(

0 commit comments

Comments
 (0)