File tree 2 files changed +7
-6
lines changed
crates/bevy_ecs/src/world
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,9 @@ impl<B: Bundle> ArchetypeStatement<B> {
98
98
}
99
99
UntypedArchetypeStatement :: AtLeastOneOf ( component_ids)
100
100
}
101
- ArchetypeStatement :: AtMostOneOf ( _) => UntypedArchetypeStatement :: AtMostOneOf ( component_ids) ,
101
+ ArchetypeStatement :: AtMostOneOf ( _) => {
102
+ UntypedArchetypeStatement :: AtMostOneOf ( component_ids)
103
+ }
102
104
ArchetypeStatement :: NoneOf ( _) => UntypedArchetypeStatement :: NoneOf ( component_ids) ,
103
105
}
104
106
}
@@ -129,7 +131,7 @@ impl<B: Bundle> ArchetypeStatement<B> {
129
131
}
130
132
131
133
/// A type-erased version of [`ArchetypeInvariant`].
132
- ///
134
+ ///
133
135
/// Intended to be used with dynamic components that cannot be represented with Rust types.
134
136
/// Prefer [`ArchetypeInvariant`] when possible.
135
137
#[ derive( Clone , Debug , PartialEq ) ]
@@ -215,10 +217,9 @@ impl UntypedArchetypeStatement {
215
217
for exclusive_id in exclusive_ids {
216
218
if component_ids. contains ( exclusive_id) {
217
219
if found_previous {
218
- return false
219
- } else {
220
- found_previous = true ;
220
+ return false ;
221
221
}
222
+ found_previous = true ;
222
223
}
223
224
}
224
225
true
Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ impl World {
663
663
archetype_invariant : ArchetypeInvariant < B1 , B2 > ,
664
664
) {
665
665
let untyped_invariant = archetype_invariant. into_untyped ( self ) ;
666
-
666
+
667
667
for archetype in & self . archetypes . archetypes {
668
668
let components = archetype. components . indices ( ) ;
669
669
untyped_invariant. test_archetype ( components) ;
You can’t perform that action at this time.
0 commit comments