mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
fix ambiguity reporting (#9648)
# Objective - I broke ambiguity reporting in one of my refactors. `conflicts_to_string` should have been using the passed in parameter rather than the one stored on self.
This commit is contained in:
parent
3527288342
commit
c2b85f9b52
2 changed files with 4 additions and 3 deletions
|
@ -1014,7 +1014,7 @@ mod tests {
|
|||
|
||||
let ambiguities: Vec<_> = schedule
|
||||
.graph()
|
||||
.conflicts_to_string(world.components())
|
||||
.conflicts_to_string(schedule.graph().conflicting_systems(), world.components())
|
||||
.collect();
|
||||
|
||||
let expected = &[
|
||||
|
|
|
@ -1553,7 +1553,7 @@ impl ScheduleGraph {
|
|||
Consider adding `before`, `after`, or `ambiguous_with` relationships between these:\n",
|
||||
);
|
||||
|
||||
for (name_a, name_b, conflicts) in self.conflicts_to_string(components) {
|
||||
for (name_a, name_b, conflicts) in self.conflicts_to_string(ambiguities, components) {
|
||||
writeln!(message, " -- {name_a} and {name_b}").unwrap();
|
||||
|
||||
if !conflicts.is_empty() {
|
||||
|
@ -1571,9 +1571,10 @@ impl ScheduleGraph {
|
|||
/// convert conflics to human readable format
|
||||
pub fn conflicts_to_string<'a>(
|
||||
&'a self,
|
||||
ambiguities: &'a [(NodeId, NodeId, Vec<ComponentId>)],
|
||||
components: &'a Components,
|
||||
) -> impl Iterator<Item = (String, String, Vec<&str>)> + 'a {
|
||||
self.conflicting_systems
|
||||
ambiguities
|
||||
.iter()
|
||||
.map(move |(system_a, system_b, conflicts)| {
|
||||
let name_a = self.get_node_name(system_a);
|
||||
|
|
Loading…
Reference in a new issue