From 1a32e2305067d7753976d1e0d68b86eefc14d01f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 19 Feb 2021 13:59:13 -0500 Subject: [PATCH] [bindings] Ensure owned objects in Vec conversion are marked `mut` --- c-bindings-gen/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())], "); }")) -- 2.39.5