Skip to content

Commit f91189c

Browse files
Bump indexmap from 2.1.0 to 2.2.1 (#1072)
* Bump indexmap from 2.1.0 to 2.2.1 Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.1.0 to 2.2.1. - [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md) - [Commits](indexmap-rs/indexmap@2.1.0...2.2.1) --- updated-dependencies: - dependency-name: indexmap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Revert "Bump indexmap from 2.1.0 to 2.2.1" This reverts commit c12d664. * Fix build * Incorporate swap_remove update from indexmap --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Carvalho <[email protected]>
1 parent e1c83a2 commit f91189c

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Cargo.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dag_algo/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -748,12 +748,12 @@ pub fn transitive_reduction(
748748
descendants.insert(v, dfs);
749749
}
750750
for desc in &descendants[&v] {
751-
u_nbrs.remove(&NodeIndex::new(desc.1));
751+
u_nbrs.swap_remove(&NodeIndex::new(desc.1));
752752
}
753753
}
754754
*check_count.get_mut(&v).unwrap() -= 1;
755755
if check_count[&v] == 0 {
756-
descendants.remove(&v);
756+
descendants.swap_remove(&v);
757757
}
758758
}
759759
for v in u_nbrs {

src/digraph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2520,7 +2520,7 @@ impl PyDiGraph {
25202520
let node_index = self.graph.add_node(obj);
25212521

25222522
// Sanitize new node index from user input.
2523-
indices_to_remove.remove(&node_index);
2523+
indices_to_remove.swap_remove(&node_index);
25242524

25252525
// Determine edges for new node.
25262526
let mut incoming_edges: Vec<_> = indices_to_remove

src/graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,7 @@ impl PyGraph {
18251825
let node_index = self.graph.add_node(obj);
18261826

18271827
// Sanitize new node index from user input.
1828-
indices_to_remove.remove(&node_index);
1828+
indices_to_remove.swap_remove(&node_index);
18291829

18301830
// Determine edges for new node.
18311831
// note: `edges_directed` returns all edges with `i` as

src/steiner_tree.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ fn fast_metric_edges(
156156
let mut paths = DictMap::with_capacity(graph.graph.node_count());
157157
let mut distance: DictMap<NodeIndex, f64> =
158158
dijkstra(&graph.graph, dummy, None, cost_fn, Some(&mut paths))?;
159-
paths.remove(&dummy);
160-
distance.remove(&dummy);
159+
paths.swap_remove(&dummy);
160+
distance.swap_remove(&dummy);
161161
graph.graph.remove_node(dummy);
162162

163163
// ``partition[u]`` holds the terminal node closest to node ``u``.

0 commit comments

Comments
 (0)