@@ -195,9 +195,11 @@ struct CommandSignatures {
195195
196196impl CommandSignatures {
197197 unsafe fn destroy ( & self ) {
198- unsafe { self . draw . destroy ( ) } ;
199- unsafe { self . draw_indexed . destroy ( ) } ;
200- unsafe { self . dispatch . destroy ( ) } ;
198+ unsafe {
199+ self . draw . destroy ( ) ;
200+ self . draw_indexed . destroy ( ) ;
201+ self . dispatch . destroy ( ) ;
202+ }
201203 }
202204}
203205
@@ -210,10 +212,12 @@ struct DeviceShared {
210212
211213impl DeviceShared {
212214 unsafe fn destroy ( & self ) {
213- unsafe { self . zero_buffer . destroy ( ) } ;
214- unsafe { self . cmd_signatures . destroy ( ) } ;
215- unsafe { self . heap_views . raw . destroy ( ) } ;
216- unsafe { self . heap_samplers . raw . destroy ( ) } ;
215+ unsafe {
216+ self . zero_buffer . destroy ( ) ;
217+ self . cmd_signatures . destroy ( ) ;
218+ self . heap_views . raw . destroy ( ) ;
219+ self . heap_samplers . raw . destroy ( ) ;
220+ }
217221 }
218222}
219223
@@ -730,12 +734,14 @@ impl crate::Surface<Api> for Surface {
730734
731735 unsafe fn unconfigure ( & mut self , device : & Device ) {
732736 if let Some ( mut sc) = self . swap_chain . take ( ) {
733- let _ = unsafe { sc. wait ( None ) } ;
734- //TODO: this shouldn't be needed,
735- // but it complains that the queue is still used otherwise
736- let _ = unsafe { device. wait_idle ( ) } ;
737- let raw = unsafe { sc. release_resources ( ) } ;
738- unsafe { raw. destroy ( ) } ;
737+ unsafe {
738+ let _ = sc. wait ( None ) ;
739+ //TODO: this shouldn't be needed,
740+ // but it complains that the queue is still used otherwise
741+ let _ = device. wait_idle ( ) ;
742+ let raw = sc. release_resources ( ) ;
743+ raw. destroy ( ) ;
744+ }
739745 }
740746 }
741747
0 commit comments