Skip to content

Commit 0a12365

Browse files
committed
Remove unnecessary clone
1 parent 1f69ba3 commit 0a12365

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn create_commodities_graph_for_region_year(
117117
}
118118

119119
// Get primary output for the process
120-
let primary_output = process.primary_output.clone();
120+
let primary_output = &process.primary_output;
121121

122122
// Create edges from all inputs to all outputs
123123
// We also create nodes the first time they are encountered
@@ -129,7 +129,7 @@ fn create_commodities_graph_for_region_year(
129129
.entry(output.clone())
130130
.or_insert_with(|| graph.add_node(output.clone()));
131131
let is_primary = match &output {
132-
GraphNode::Commodity(commodity_id) => primary_output == Some(commodity_id.clone()),
132+
GraphNode::Commodity(commodity_id) => primary_output.as_ref() == Some(commodity_id),
133133
_ => false,
134134
};
135135

0 commit comments

Comments
 (0)