@@ -47,42 +47,16 @@ impl SystemOrderAmbiguity {
47
47
) -> Self {
48
48
use SystemStageSegment :: * ;
49
49
50
- // TODO: blocked on https://github.com/bevyengine/bevy/pull/4166
51
- // We can't grab the system container generically, because .parallel_systems()
52
- // and the exclusive equivalent return a different type,
53
- // and SystemContainer is not object-safe
54
- let ( system_a_name, system_b_name) = match segment {
55
- Parallel => {
56
- let system_container = stage. parallel_systems ( ) ;
57
- (
58
- system_container[ system_a_index] . name ( ) ,
59
- system_container[ system_b_index] . name ( ) ,
60
- )
61
- }
62
- ExclusiveAtStart => {
63
- let system_container = stage. exclusive_at_start_systems ( ) ;
64
- (
65
- system_container[ system_a_index] . name ( ) ,
66
- system_container[ system_b_index] . name ( ) ,
67
- )
68
- }
69
- ExclusiveBeforeCommands => {
70
- let system_container = stage. exclusive_before_commands_systems ( ) ;
71
- (
72
- system_container[ system_a_index] . name ( ) ,
73
- system_container[ system_b_index] . name ( ) ,
74
- )
75
- }
76
- ExclusiveAtEnd => {
77
- let system_container = stage. exclusive_at_end_systems ( ) ;
78
- (
79
- system_container[ system_a_index] . name ( ) ,
80
- system_container[ system_b_index] . name ( ) ,
81
- )
82
- }
50
+ let systems = match segment {
51
+ Parallel => stage. parallel_systems ( ) ,
52
+ ExclusiveAtStart => stage. exclusive_at_start_systems ( ) ,
53
+ ExclusiveBeforeCommands => stage. exclusive_before_commands_systems ( ) ,
54
+ ExclusiveAtEnd => stage. exclusive_at_end_systems ( ) ,
83
55
} ;
84
-
85
- let mut system_names = [ system_a_name. to_string ( ) , system_b_name. to_string ( ) ] ;
56
+ let mut system_names = [
57
+ systems[ system_a_index] . name ( ) . to_string ( ) ,
58
+ systems[ system_b_index] . name ( ) . to_string ( ) ,
59
+ ] ;
86
60
system_names. sort ( ) ;
87
61
88
62
let mut conflicts: Vec < _ > = component_ids
0 commit comments