File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ impl AllocatorVisualizer {
144144
145145 if block. sub_allocator . supports_visualization ( )
146146 && ui. button ( "visualize" ) . clicked ( )
147- && !self . selected_blocks . iter ( ) . enumerate ( ) . any ( |( _ , x ) | {
147+ && !self . selected_blocks . iter ( ) . any ( |x | {
148148 x. memory_type_index == mem_type_idx
149149 && x. block_index == block_idx
150150 } )
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ impl<'a> AllocationCreateDesc<'a> {
8787 name : & ' a str ,
8888 length : u64 ,
8989 location : MemoryLocation ,
90- ) -> AllocationCreateDesc < ' a > {
90+ ) -> Self {
9191 let size_and_align =
9292 device. heap_buffer_size_and_align ( length, memory_location_to_metal ( location) ) ;
9393 Self {
@@ -98,11 +98,7 @@ impl<'a> AllocationCreateDesc<'a> {
9898 }
9999 }
100100
101- pub fn texture (
102- device : & metal:: Device ,
103- name : & ' a str ,
104- desc : & metal:: TextureDescriptor ,
105- ) -> AllocationCreateDesc < ' a > {
101+ pub fn texture ( device : & metal:: Device , name : & ' a str , desc : & metal:: TextureDescriptor ) -> Self {
106102 let size_and_align = device. heap_texture_size_and_align ( desc) ;
107103 Self {
108104 name,
@@ -122,7 +118,7 @@ impl<'a> AllocationCreateDesc<'a> {
122118 name : & ' a str ,
123119 size : u64 ,
124120 location : MemoryLocation ,
125- ) -> AllocationCreateDesc < ' a > {
121+ ) -> Self {
126122 let size_and_align = device. heap_acceleration_structure_size_and_align_with_size ( size) ;
127123 Self {
128124 name,
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl AllocatorVisualizer {
121121
122122 if block. sub_allocator . supports_visualization ( )
123123 && ui. button ( "visualize" ) . clicked ( )
124- && !self . selected_blocks . iter ( ) . enumerate ( ) . any ( |( _ , x ) | {
124+ && !self . selected_blocks . iter ( ) . any ( |x | {
125125 x. memory_type_index == mem_type_idx
126126 && x. block_index == block_idx
127127 } )
You can’t perform that action at this time.
0 commit comments