Skip to content

Commit 216c773

Browse files
committed
refactor(pact integration): rename MappedFields to PACTMappedFields
1 parent 535c349 commit 216c773

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

gen/src/pact_integration.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use crate::{Hoc, HocCo2eIntensityThroughput, ShipmentFootprint, Toc};
3232
}
3333
} */
3434

35-
pub struct MappedFields {
35+
pub struct PACTMappedFields {
3636
product_id_type: &'static str,
3737
data_schema_id: &'static str,
3838
id: String,
@@ -42,9 +42,9 @@ pub struct MappedFields {
4242
p_cf_excluding_biogenic: Decimal,
4343
}
4444

45-
impl From<&ShipmentFootprint> for MappedFields {
45+
impl From<&ShipmentFootprint> for PACTMappedFields {
4646
fn from(shipment: &ShipmentFootprint) -> Self {
47-
MappedFields {
47+
PACTMappedFields {
4848
product_id_type: "shipment",
4949
data_schema_id: "shipment-footprint",
5050
id: shipment.shipment_id.clone(),
@@ -64,9 +64,9 @@ impl From<&ShipmentFootprint> for MappedFields {
6464
}
6565
}
6666

67-
impl From<&Hoc> for MappedFields {
67+
impl From<&Hoc> for PACTMappedFields {
6868
fn from(hoc: &Hoc) -> Self {
69-
MappedFields {
69+
PACTMappedFields {
7070
product_id_type: "hoc",
7171
data_schema_id: "hoc",
7272
id: hoc.hoc_id.clone(),
@@ -83,9 +83,9 @@ impl From<&Hoc> for MappedFields {
8383
}
8484
}
8585

86-
impl From<&Toc> for MappedFields {
86+
impl From<&Toc> for PACTMappedFields {
8787
fn from(toc: &Toc) -> Self {
88-
MappedFields {
88+
PACTMappedFields {
8989
product_id_type: "toc",
9090
data_schema_id: "toc",
9191
id: toc.toc_id.clone(),
@@ -114,7 +114,7 @@ pub fn to_pcf<T>(
114114
) -> ProductFootprint
115115
where
116116
T: Serialize,
117-
MappedFields: for<'a> From<&'a T>,
117+
PACTMappedFields: for<'a> From<&'a T>,
118118
{
119119
// massage the optional IPCC characterization factors into a tuple of the actual factors and the IPCC Characterization Factor sources
120120
let (characterization_factors, characterization_factors_sources) =
@@ -126,7 +126,7 @@ where
126126
// the current implementation bails out drastically. We are investingating whether
127127
// this is indicates a lack in the iLEAP Data Model. This function will be updated
128128
// once we have more information.
129-
let MappedFields {
129+
let PACTMappedFields {
130130
product_id_type,
131131
data_schema_id,
132132
id,

0 commit comments

Comments
 (0)