We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f69ba3 commit 0a12365Copy full SHA for 0a12365
1 file changed
src/graph.rs
@@ -117,7 +117,7 @@ fn create_commodities_graph_for_region_year(
117
}
118
119
// Get primary output for the process
120
- let primary_output = process.primary_output.clone();
+ let primary_output = &process.primary_output;
121
122
// Create edges from all inputs to all outputs
123
// We also create nodes the first time they are encountered
@@ -129,7 +129,7 @@ fn create_commodities_graph_for_region_year(
129
.entry(output.clone())
130
.or_insert_with(|| graph.add_node(output.clone()));
131
let is_primary = match &output {
132
- GraphNode::Commodity(commodity_id) => primary_output == Some(commodity_id.clone()),
+ GraphNode::Commodity(commodity_id) => primary_output.as_ref() == Some(commodity_id),
133
_ => false,
134
};
135
0 commit comments