We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93ce9a0 + 6e363af commit b9f004eCopy full SHA for b9f004e
shopify_function_macro/src/lib.rs
@@ -104,8 +104,9 @@ pub fn shopify_function(
104
std::io::Read::read_to_string(&mut #input_stream, &mut string)?;
105
let input: #input_type = serde_json::from_str(&string)?;
106
let mut out = #output_stream;
107
- let mut serializer = serde_json::Serializer::new(&mut out);
108
- #name(input)?.serialize(&mut serializer)?;
+ let result = #name(input)?;
+ let serialized = serde_json::to_vec(&result)?;
109
+ std::io::Write::write_all(&mut out, serialized.as_slice())?;
110
Ok(())
111
}
112
#ast
0 commit comments