Skip to content

Commit

Permalink
Fix compatibility with priority-queue 1.3.0 (#745) (#746)
Browse files Browse the repository at this point in the history
In priority-queue 1.3.0 compilation of rustworkx-core's min_cut module
will fail because of the lack of a semicolon on the change_priority_by()
call. This wasn't an issue with priority-queue 1.2.0 and for rustworkx
development we are using priority-queue 1.2.0 because the priority queue
1.3.0 requires a rust version newer than our msrv. However, adding a
semicolon to fix this compilation issue is also still compatibile with
priority-queue 1.2.0. This commit does that to fix compatibility with
newer versions of rustworkx-core that want to leverage the latest
version of priority queue where they don't have the same MSRV
constraints as rustworkx.

Fixes #744

(cherry picked from commit 46a8799)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
  • Loading branch information
mergify[bot] and mtreinish committed Nov 21, 2022
1 parent 37b3f63 commit 1a097bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed a compatibility issue when building ``rustworkx-core`` with
priority-queue 1.3.0.
Fixed `#744 <https://github.com/Qiskit/rustworkx/issues/744>`__
2 changes: 1 addition & 1 deletion rustworkx-core/src/connectivity/min_cut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ where
for edge in graph.edges(nx) {
pq.change_priority_by(&edge.target(), |x| {
*x += edge_cost(edge);
})
});
}
}

Expand Down

0 comments on commit 1a097bf

Please sign in to comment.