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.
This commit is contained in:
Giacomo Stevanato 2024-07-27 18:15:39 +02:00 committed by GitHub
parent 4f5b8ca08c
commit bc80b95257
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,10 +94,7 @@ impl<I, O> std::hash::Hash for SystemId<I, O> {
impl<I, O> std::fmt::Debug for SystemId<I, O> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple("SystemId")
.field(&self.entity)
.field(&self.entity)
.finish()
f.debug_tuple("SystemId").field(&self.entity).finish()
}
}