Skip to content

Commit

Permalink
Bump indexmap from 2.1.0 to 2.2.1 (#1072)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Carvalho <ivancarv@student.ubc.ca>
  • Loading branch information
dependabot[bot] and IvanIsCoding authored Jan 30, 2024
1 parent e1c83a2 commit f91189c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/dag_algo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,12 +748,12 @@ pub fn transitive_reduction(
descendants.insert(v, dfs);
}
for desc in &descendants[&v] {
u_nbrs.remove(&NodeIndex::new(desc.1));
u_nbrs.swap_remove(&NodeIndex::new(desc.1));
}
}
*check_count.get_mut(&v).unwrap() -= 1;
if check_count[&v] == 0 {
descendants.remove(&v);
descendants.swap_remove(&v);
}
}
for v in u_nbrs {
Expand Down
2 changes: 1 addition & 1 deletion src/digraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2520,7 +2520,7 @@ impl PyDiGraph {
let node_index = self.graph.add_node(obj);

// Sanitize new node index from user input.
indices_to_remove.remove(&node_index);
indices_to_remove.swap_remove(&node_index);

// Determine edges for new node.
let mut incoming_edges: Vec<_> = indices_to_remove
Expand Down
2 changes: 1 addition & 1 deletion src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@ impl PyGraph {
let node_index = self.graph.add_node(obj);

// Sanitize new node index from user input.
indices_to_remove.remove(&node_index);
indices_to_remove.swap_remove(&node_index);

// Determine edges for new node.
// note: `edges_directed` returns all edges with `i` as
Expand Down
4 changes: 2 additions & 2 deletions src/steiner_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ fn fast_metric_edges(
let mut paths = DictMap::with_capacity(graph.graph.node_count());
let mut distance: DictMap<NodeIndex, f64> =
dijkstra(&graph.graph, dummy, None, cost_fn, Some(&mut paths))?;
paths.remove(&dummy);
distance.remove(&dummy);
paths.swap_remove(&dummy);
distance.swap_remove(&dummy);
graph.graph.remove_node(dummy);

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

0 comments on commit f91189c

Please sign in to comment.