Skip to content

Commit 14f5def

Browse files
Direct collect boxed slices
Co-authored-by: ira <[email protected]>
1 parent 7bd305d commit 14f5def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_reflect/src/enums/enum_trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ impl EnumInfo {
158158
let variant_names = variants
159159
.iter()
160160
.map(|variant| variant.name())
161-
.collect::<Vec<_>>();
161+
.collect();
162162

163163
Self {
164164
name,
165165
type_name: std::any::type_name::<TEnum>(),
166166
type_id: TypeId::of::<TEnum>(),
167167
variants: variants.to_vec().into_boxed_slice(),
168-
variant_names: variant_names.into_boxed_slice(),
168+
variant_names,
169169
variant_indices,
170170
}
171171
}

0 commit comments

Comments
 (0)