Skip to content

Commit

Permalink
Fixed unnecessary owning of value
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoulLuque committed Apr 7, 2024
1 parent 1058610 commit 82ecd52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/find_width_of_tree_decomposition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::collections::HashSet;
/// Returns the maximum size of one of the bags in the tree decomposition graph.
/// This equals the highest len of one of the vertices in the graph. Returns 0 if the graph has no vertices
pub fn find_width_of_tree_decomposition<E>(
graph: Graph<HashSet<NodeIndex>, E, petgraph::prelude::Undirected>,
graph: &Graph<HashSet<NodeIndex>, E, petgraph::prelude::Undirected>,
) -> usize {
if let Some(bag) = graph.node_weights().max_by_key(|b| b.len()) {
bag.len()
Expand Down

0 comments on commit 82ecd52

Please sign in to comment.