From 9c6608773df652814962e0ed346b012749a4f2f8 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 27 Apr 2020 17:36:15 +0300 Subject: [PATCH] return hash from wasm --- phase2/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phase2/src/lib.rs b/phase2/src/lib.rs index 7b70380..3119d1d 100644 --- a/phase2/src/lib.rs +++ b/phase2/src/lib.rs @@ -81,7 +81,12 @@ cfg_if! { let mut output: Vec = vec![]; params.write(&mut output).expect("failed to write updated parameters"); log!("Returning parameters"); - Ok(output) + + Ok(hash + .iter().cloned() + .chain(output.iter().cloned()) + .collect() + ) } } }