projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f06b53
)
[bindings] Ensure owned objects in Vec conversion are marked `mut`
author
Matt Corallo
<git@bluematt.me>
Fri, 19 Feb 2021 18:59:13 +0000
(13:59 -0500)
committer
Matt Corallo
<git@bluematt.me>
Fri, 19 Feb 2021 19:00:41 +0000
(14:00 -0500)
c-bindings-gen/src/types.rs
patch
|
blob
|
history
diff --git
a/c-bindings-gen/src/types.rs
b/c-bindings-gen/src/types.rs
index 2b195e2dcb957d630bf4478e3204fc5d76a895c5..f7d1e7fa693b5e97605c412741c7dd099aedbf80 100644
(file)
--- 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())], "); }"))