Skip to content

Commit 531d9b7

Browse files
authored
Simplify the if-statement
1 parent 4540b80 commit 531d9b7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

crates/viewer/re_renderer/src/allocator/cpu_write_gpu_read_belt.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ where
134134
// https://github.com/purpleprotocol/mimalloc_rust/issues/128
135135
// Therefore, large alignments won't work with collect.
136136
let pretend_mimalloc_aligns_correctly = false;
137-
if elements.len() > 1
138-
&& (pretend_mimalloc_aligns_correctly || std::mem::align_of::<T>() <= 64)
139-
{
137+
if std::mem::align_of::<T>() <= 64 || pretend_mimalloc_aligns_correctly {
140138
let vec: Vec<T> = elements.collect();
141139

142140
#[allow(clippy::dbg_macro)]

0 commit comments

Comments
 (0)