Skip to content

Commit cb8ccb6

Browse files
chore: update generic type constraints
1 parent 54294b2 commit cb8ccb6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gen/src/pact_integration.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use pact_data_model::{
66
ProductIdSet, SpecVersionString, Urn, VersionInteger,
77
};
88
use rust_decimal::Decimal;
9+
use schemars::JsonSchema;
910
use serde::Serialize;
1011
use uuid::Uuid;
1112

@@ -113,7 +114,7 @@ pub fn to_pcf<T>(
113114
characterization_factors: Option<Vec<CharacterizationFactors>>,
114115
) -> ProductFootprint<T>
115116
where
116-
T: Serialize,
117+
T: JsonSchema + Serialize,
117118
PactMappedFields: for<'a> From<&'a T>,
118119
{
119120
// Massage the optional IPCC characterization factors into a tuple of the actual factors and the

0 commit comments

Comments
 (0)