From 31579a6bb23f4c7473c528f6f377ac5ba71f2905 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Fri, 29 Sep 2023 09:02:05 -0500 Subject: [PATCH] Correct return types for Rust tx parsing --- librustzcash-wrapper/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/librustzcash-wrapper/src/lib.rs b/librustzcash-wrapper/src/lib.rs index 744a911..e5879ef 100644 --- a/librustzcash-wrapper/src/lib.rs +++ b/librustzcash-wrapper/src/lib.rs @@ -457,14 +457,16 @@ pub extern "C" fn rust_wrapper_tx_parse( marshall_to_haskell_var(&s_output, out, out_len, RW); }, None => { - let z = HrawTx { bytes: vec![0], s: false, o: false}; + let mut z = Vec::new(); + z.push(vec![0]); marshall_to_haskell_var(&z, out, out_len, RW); } } }, Err(_e) => { - let y = HrawTx { bytes: vec![0], s: false, o: false}; + let mut y = Vec::new(); + y.push(vec![0]); marshall_to_haskell_var(&y, out, out_len, RW); } }