Find all the back-edges in the graph.
(&self)
| 879 | graph: Graph<(LockGuardId, LockGuardId), DeadlockPossibility, Directed>, |
| 880 | } |
| 881 | |
| 882 | impl ConflictLockGraph { |
| 883 | fn new() -> Self { |
| 884 | Self { |
| 885 | graph: Graph::new(), |
| 886 | } |
| 887 | } |
| 888 | fn add_node(&mut self, relation: (LockGuardId, LockGuardId)) -> RelationId { |
| 889 | self.graph.add_node(relation) |
| 890 | } |
| 891 | |
| 892 | fn add_edge(&mut self, a: RelationId, b: RelationId, weight: DeadlockPossibility) { |
| 893 | self.graph.add_edge(a, b, weight); |
| 894 | } |
| 895 | |
| 896 | fn node_weight(&self, a: RelationId) -> Option<&(LockGuardId, LockGuardId)> { |
| 897 | self.graph.node_weight(a) |
| 898 | } |
| 899 | |
| 900 | /// Find all the back-edges in the graph. |
| 901 | fn back_edges(&self) -> Vec<(RelationId, RelationId)> { |
| 902 | let mut back_edges = Vec::new(); |
| 903 | let nodes = self.graph.node_indices(); |
| 904 | for start in nodes { |