Skip to content

Commit bc80b95

Browse files
authored
Don't debug SystemId's entity field twice (#14499)
# Objective - `SystemId`'s `Debug` implementation includes its `entity` field twice. - This was likely an oversight in #11019, since before that PR the second field was the `PhantomData` one. ## Solution - Only include it once Alternatively, this could be changed to match the struct representation of `SystemId`, thus instructing the formatter to print a named struct and including the `PhantomData` field.
1 parent 4f5b8ca commit bc80b95

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/bevy_ecs/src/system/system_registry.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ impl<I, O> std::hash::Hash for SystemId<I, O> {
9494

9595
impl<I, O> std::fmt::Debug for SystemId<I, O> {
9696
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
97-
f.debug_tuple("SystemId")
98-
.field(&self.entity)
99-
.field(&self.entity)
100-
.finish()
97+
f.debug_tuple("SystemId").field(&self.entity).finish()
10198
}
10299
}
103100

0 commit comments

Comments
 (0)