File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ impl AllocatorVisualizer {
144
144
145
145
if block. sub_allocator . supports_visualization ( )
146
146
&& ui. button ( "visualize" ) . clicked ( )
147
- && !self . selected_blocks . iter ( ) . enumerate ( ) . any ( |( _ , x ) | {
147
+ && !self . selected_blocks . iter ( ) . any ( |x | {
148
148
x. memory_type_index == mem_type_idx
149
149
&& x. block_index == block_idx
150
150
} )
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ impl<'a> AllocationCreateDesc<'a> {
87
87
name : & ' a str ,
88
88
length : u64 ,
89
89
location : MemoryLocation ,
90
- ) -> AllocationCreateDesc < ' a > {
90
+ ) -> Self {
91
91
let size_and_align =
92
92
device. heap_buffer_size_and_align ( length, memory_location_to_metal ( location) ) ;
93
93
Self {
@@ -98,11 +98,7 @@ impl<'a> AllocationCreateDesc<'a> {
98
98
}
99
99
}
100
100
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 {
106
102
let size_and_align = device. heap_texture_size_and_align ( desc) ;
107
103
Self {
108
104
name,
@@ -122,7 +118,7 @@ impl<'a> AllocationCreateDesc<'a> {
122
118
name : & ' a str ,
123
119
size : u64 ,
124
120
location : MemoryLocation ,
125
- ) -> AllocationCreateDesc < ' a > {
121
+ ) -> Self {
126
122
let size_and_align = device. heap_acceleration_structure_size_and_align_with_size ( size) ;
127
123
Self {
128
124
name,
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl AllocatorVisualizer {
121
121
122
122
if block. sub_allocator . supports_visualization ( )
123
123
&& ui. button ( "visualize" ) . clicked ( )
124
- && !self . selected_blocks . iter ( ) . enumerate ( ) . any ( |( _ , x ) | {
124
+ && !self . selected_blocks . iter ( ) . any ( |x | {
125
125
x. memory_type_index == mem_type_idx
126
126
&& x. block_index == block_idx
127
127
} )
You can’t perform that action at this time.
0 commit comments