From b915c29c017ee59df0c2ef7fa9235925bc3d2a8c Mon Sep 17 00:00:00 2001 From: "tien.xuan.vo" Date: Mon, 20 Nov 2023 15:08:20 +0700 Subject: [PATCH] feat: Apply generators to message's metadata --- rust/pact_ffi/src/models/message.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/pact_ffi/src/models/message.rs b/rust/pact_ffi/src/models/message.rs index 21baa9b04..65f5c9b14 100644 --- a/rust/pact_ffi/src/models/message.rs +++ b/rust/pact_ffi/src/models/message.rs @@ -540,11 +540,13 @@ ffi_fn! { /// If no further data is present, returns NULL. fn pactffi_message_metadata_iter_next(iter: *mut MessageMetadataIterator) -> *mut MessageMetadataPair { let iter = as_mut!(iter); + let generated_metadata; let metadata = match iter.message { Either::Left(message) => { let message = as_ref!(message); - &message.metadata + generated_metadata = block_on(generate_message(message, &GeneratorTestMode::Consumer, &hashmap!{}, &vec![], &hashmap!{})).metadata; + &generated_metadata } Either::Right(contents) => { let contents = as_ref!(contents);