Skip to content

Commit

Permalink
Remove unnecessary if statement in scheduler (#10446)
Browse files Browse the repository at this point in the history
# Objective

There is an if statement checking if a node is present in a graph
moments after it explicitly being added.
Unless the edge function has super weird side effects and the tests
don't pass, this is unnecessary.

## Solution

Removed it
  • Loading branch information
DasLixou authored Nov 9, 2023
1 parent 0cc1179 commit 003765a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions crates/bevy_ecs/src/schedule/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,6 @@ impl ScheduleGraph {
self.dependency.graph.add_node(set);
}

if !self.dependency.graph.contains_node(id) {
self.dependency.graph.add_node(id);
}

for (kind, set) in dependencies
.into_iter()
.map(|Dependency { kind, set }| (kind, self.system_set_ids[&set]))
Expand Down

0 comments on commit 003765a

Please sign in to comment.