[bindings] Ensure owned objects in Vec conversion are marked mut

This commit is contained in:
Matt Corallo 2021-02-19 13:59:13 -05:00
parent 2f06b53abf
commit 1a32e23050

View file

@ -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())], "); }"))