Skip to content

Commit

Permalink
Run cargo fmt and cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sixfold-origami committed Jun 27, 2022
1 parent 5ac9021 commit 5c4d486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions crates/bevy_ecs/src/world/archetype_invariants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ impl<B: Bundle> ArchetypeStatement<B> {
}
UntypedArchetypeStatement::AtLeastOneOf(component_ids)
}
ArchetypeStatement::AtMostOneOf(_) => UntypedArchetypeStatement::AtMostOneOf(component_ids),
ArchetypeStatement::AtMostOneOf(_) => {
UntypedArchetypeStatement::AtMostOneOf(component_ids)
}
ArchetypeStatement::NoneOf(_) => UntypedArchetypeStatement::NoneOf(component_ids),
}
}
Expand Down Expand Up @@ -129,7 +131,7 @@ impl<B: Bundle> ArchetypeStatement<B> {
}

/// A type-erased version of [`ArchetypeInvariant`].
///
///
/// Intended to be used with dynamic components that cannot be represented with Rust types.
/// Prefer [`ArchetypeInvariant`] when possible.
#[derive(Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -215,10 +217,9 @@ impl UntypedArchetypeStatement {
for exclusive_id in exclusive_ids {
if component_ids.contains(exclusive_id) {
if found_previous {
return false
} else {
found_previous = true;
return false;
}
found_previous = true;
}
}
true
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ impl World {
archetype_invariant: ArchetypeInvariant<B1, B2>,
) {
let untyped_invariant = archetype_invariant.into_untyped(self);

for archetype in &self.archetypes.archetypes {
let components = archetype.components.indices();
untyped_invariant.test_archetype(components);
Expand Down

0 comments on commit 5c4d486

Please sign in to comment.