From 82ecd526f44ca709fd79d9d790b4c9378fd18661 Mon Sep 17 00:00:00 2001 From: RaoulLuque Date: Sun, 7 Apr 2024 14:39:52 +0200 Subject: [PATCH] Fixed unnecessary owning of value --- src/algorithms/find_width_of_tree_decomposition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/find_width_of_tree_decomposition.rs b/src/algorithms/find_width_of_tree_decomposition.rs index 6c4d88b..499a60a 100644 --- a/src/algorithms/find_width_of_tree_decomposition.rs +++ b/src/algorithms/find_width_of_tree_decomposition.rs @@ -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( - graph: Graph, E, petgraph::prelude::Undirected>, + graph: &Graph, E, petgraph::prelude::Undirected>, ) -> usize { if let Some(bag) = graph.node_weights().max_by_key(|b| b.len()) { bag.len()