Skip to content

Commit 489dca7

Browse files
jakobhellermannmockersf
authored andcommitted
bevy_ecs: forward type_id in InfallibleSystemWrapper (#18931)
similar to #12030 # Objective `bevy_mod_debugdump` uses the `SystemTypeSet::system_type` to look up constrains like `(system_1, system_2.after(system_1))`. For that it needs to find the type id in `schedule.graph().systems()` Now with systems being wrapped in an `InfallibleSystemWrapper` this association was no longer possible. ## Solution By forwarding the type id in `InfallibleSystemWrapper`, `bevy_mod_debugdump` can resolve the dependencies as before, and the wrapper is an unnoticable implementation detail. ## Testing - `cargo test -p bevy_ecs` I'm not sure what exactly could break otherwise.
1 parent ddc3264 commit 489dca7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_ecs/src/system/schedule_system.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ impl<S: System<In = ()>> System for InfallibleSystemWrapper<S> {
3030
self.0.name()
3131
}
3232

33+
fn type_id(&self) -> core::any::TypeId {
34+
self.0.type_id()
35+
}
36+
3337
#[inline]
3438
fn component_access(&self) -> &Access<ComponentId> {
3539
self.0.component_access()

0 commit comments

Comments
 (0)