@@ -195,9 +195,11 @@ struct CommandSignatures {
195
195
196
196
impl CommandSignatures {
197
197
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
+ }
201
203
}
202
204
}
203
205
@@ -210,10 +212,12 @@ struct DeviceShared {
210
212
211
213
impl DeviceShared {
212
214
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
+ }
217
221
}
218
222
}
219
223
@@ -730,12 +734,14 @@ impl crate::Surface<Api> for Surface {
730
734
731
735
unsafe fn unconfigure ( & mut self , device : & Device ) {
732
736
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
+ }
739
745
}
740
746
}
741
747
0 commit comments