diff options
author | JSDurand <mmemmew@gmail.com> | 2023-03-14 23:16:45 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-03-14 23:16:45 +0800 |
commit | f5aac87978e58a5551351cc49e5309e7b2f9e870 (patch) | |
tree | 14b5cde3e64c0e4be934e45ae9453817cfbb6f15 /src/incremental.rs | |
parent | dca341dbb54737e8cc14a41088e23d23f7eb385e (diff) |
Fix order of adding edges
* incremental.rs: A call to `add_edge` was placed at the wrong place.
Diffstat (limited to 'src/incremental.rs')
-rw-r--r-- | src/incremental.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/incremental.rs b/src/incremental.rs index 361da7c..3f853bf 100644 --- a/src/incremental.rs +++ b/src/incremental.rs @@ -162,8 +162,6 @@ fn smi_step<T: PartialOrd>( if let Some(cand) = to_compare { *count += 1; - add_edge(graph.borrow_mut(), cand, assoc); - let acand = a.get(cand).unwrap(); let a_assoc = a.get(assoc).unwrap(); @@ -181,6 +179,8 @@ fn smi_step<T: PartialOrd>( continue; } + add_edge(graph.borrow_mut(), cand, assoc); + match acand.partial_cmp(a_assoc) { Some(Ordering::Less) | Some(Ordering::Equal) => {} _ => { |