From: Matt Corallo Date: Fri, 19 Feb 2021 18:59:13 +0000 (-0500) Subject: [bindings] Ensure owned objects in Vec conversion are marked `mut` X-Git-Tag: v0.0.13~24^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=1a32e2305067d7753976d1e0d68b86eefc14d01f;p=rust-lightning [bindings] Ensure owned objects in Vec conversion are marked `mut` --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 2b195e2dc..f7d1e7fa6 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -963,7 +963,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { ").into() }")) }, "Vec" if !is_ref => { - Some(("Vec::new(); for item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "item".to_string())], "); }")) + Some(("Vec::new(); for mut item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "item".to_string())], "); }")) }, "Slice" => { Some(("Vec::new(); for item in ", vec![(format!(".iter() {{ local_{}.push(", var_name), "**item".to_string())], "); }"))