Skip to content

Commit 5c4d486

Browse files
Run cargo fmt and cargo clippy
1 parent 5ac9021 commit 5c4d486

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

crates/bevy_ecs/src/world/archetype_invariants.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ impl<B: Bundle> ArchetypeStatement<B> {
9898
}
9999
UntypedArchetypeStatement::AtLeastOneOf(component_ids)
100100
}
101-
ArchetypeStatement::AtMostOneOf(_) => UntypedArchetypeStatement::AtMostOneOf(component_ids),
101+
ArchetypeStatement::AtMostOneOf(_) => {
102+
UntypedArchetypeStatement::AtMostOneOf(component_ids)
103+
}
102104
ArchetypeStatement::NoneOf(_) => UntypedArchetypeStatement::NoneOf(component_ids),
103105
}
104106
}
@@ -129,7 +131,7 @@ impl<B: Bundle> ArchetypeStatement<B> {
129131
}
130132

131133
/// A type-erased version of [`ArchetypeInvariant`].
132-
///
134+
///
133135
/// Intended to be used with dynamic components that cannot be represented with Rust types.
134136
/// Prefer [`ArchetypeInvariant`] when possible.
135137
#[derive(Clone, Debug, PartialEq)]
@@ -215,10 +217,9 @@ impl UntypedArchetypeStatement {
215217
for exclusive_id in exclusive_ids {
216218
if component_ids.contains(exclusive_id) {
217219
if found_previous {
218-
return false
219-
} else {
220-
found_previous = true;
220+
return false;
221221
}
222+
found_previous = true;
222223
}
223224
}
224225
true

crates/bevy_ecs/src/world/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ impl World {
663663
archetype_invariant: ArchetypeInvariant<B1, B2>,
664664
) {
665665
let untyped_invariant = archetype_invariant.into_untyped(self);
666-
666+
667667
for archetype in &self.archetypes.archetypes {
668668
let components = archetype.components.indices();
669669
untyped_invariant.test_archetype(components);

0 commit comments

Comments
 (0)