@@ -447,14 +447,12 @@ impl<A: hal::Api> Example<A> {
447447 let texture_view = unsafe { device. create_texture_view ( & texture, & view_desc) . unwrap ( ) } ;
448448
449449 let global_group = {
450- let global_buffer_binding = unsafe {
451- // SAFETY: This is the same size that was specified for buffer creation.
452- hal:: BufferBinding :: new_unchecked (
453- & global_buffer,
454- 0 ,
455- NonZeroU64 :: new ( global_buffer_desc. size ) ,
456- )
457- } ;
450+ // SAFETY: This is the same size that was specified for buffer creation.
451+ let global_buffer_binding = hal:: BufferBinding :: new_unchecked (
452+ & global_buffer,
453+ 0 ,
454+ NonZeroU64 :: new ( global_buffer_desc. size ) ,
455+ ) ;
458456 let texture_binding = hal:: TextureBinding {
459457 view : & texture_view,
460458 usage : wgpu_types:: TextureUses :: RESOURCE ,
@@ -488,14 +486,12 @@ impl<A: hal::Api> Example<A> {
488486 } ;
489487
490488 let local_group = {
491- let local_buffer_binding = unsafe {
492- // SAFETY: The size must fit within the buffer.
493- hal:: BufferBinding :: new_unchecked (
494- & local_buffer,
495- 0 ,
496- wgpu_types:: BufferSize :: new ( size_of :: < Locals > ( ) as _ ) ,
497- )
498- } ;
489+ // SAFETY: The size must fit within the buffer.
490+ let local_buffer_binding = hal:: BufferBinding :: new_unchecked (
491+ & local_buffer,
492+ 0 ,
493+ wgpu_types:: BufferSize :: new ( size_of :: < Locals > ( ) as _ ) ,
494+ ) ;
499495 let local_group_desc = hal:: BindGroupDescriptor {
500496 label : Some ( "local" ) ,
501497 layout : & local_group_layout,
0 commit comments