Skip to content

Commit d1bd6b3

Browse files
fix: import UUID and udpdate energyConsumptionUnit type
1 parent 1a44573 commit d1bd6b3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

gen/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use serde::{Deserialize, Serialize};
1515

1616
mod pact_integration;
1717
pub use pact_integration::*;
18+
use uuid::Uuid;
1819

1920
mod arbitrary_impls;
2021

@@ -807,4 +808,4 @@ mod tests {
807808

808809
println!("{footprints:#?}");
809810
}
810-
}
811+
}

gen/src/pact_integration.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ fn toc_to_pcf() {
381381
region_provenance: Some("Europe".to_string()),
382382
}]),
383383
energy_consumption: None,
384-
energy_consumption_unit: Some("MJ".to_string()),
384+
energy_consumption_unit: Some(crate::EnergyConsumptionUnit::MJ),
385385
emission_factor_wtw: dec!(97).into(),
386386
emission_factor_ttw: dec!(0).into(),
387387
}]
@@ -429,15 +429,15 @@ fn hoc_to_pfc() {
429429
energy_carrier: EnergyCarrierType::Diesel,
430430
feedstocks: None,
431431
energy_consumption: None,
432-
energy_consumption_unit: Some("kg".to_string()),
432+
energy_consumption_unit: Some(crate::EnergyConsumptionUnit::Kg),
433433
emission_factor_wtw: dec!(4.13).into(),
434434
emission_factor_ttw: dec!(3.17).into(),
435435
},
436436
EnergyCarrier {
437437
energy_carrier: EnergyCarrierType::Electric,
438438
feedstocks: None,
439439
energy_consumption: None,
440-
energy_consumption_unit: Some("MJ".to_string()),
440+
energy_consumption_unit: Some(crate::EnergyConsumptionUnit::MJ),
441441
emission_factor_wtw: dec!(97).into(),
442442
emission_factor_ttw: dec!(0).into(),
443443
},

0 commit comments

Comments
 (0)