We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d16d4d2 commit 808b951Copy full SHA for 808b951
src/directed/dijkstra.rs
@@ -213,17 +213,11 @@ where
213
let mut target_reached = None;
214
while let Some(SmallestHolder { cost, index }) = to_see.pop() {
215
let successors = {
216
- let (node, &(_, c)) = parents.get_index(index).unwrap();
+ let (node, _) = parents.get_index(index).unwrap();
217
if stop(node) {
218
target_reached = Some(index);
219
break;
220
}
221
- // We may have inserted a node several time into the binary heap if we found
222
- // a better way to access it. Ensure that we are currently dealing with the
223
- // best path and discard the others.
224
- if cost > c {
225
- continue;
226
- }
227
successors(node)
228
};
229
for (successor, move_cost) in successors {
0 commit comments