]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Drop redundant deref in vec iteration
authorMatt Corallo <git@bluematt.me>
Mon, 26 Apr 2021 15:42:09 +0000 (15:42 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 26 Apr 2021 16:03:41 +0000 (16:03 +0000)
c-bindings-gen/src/types.rs

index efb12b836e0033284f665b21171b8a0343351fd3..c230770d144a2ccc1808aabdac2946b48fe181c3 100644 (file)
@@ -1159,7 +1159,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
                                Some(("Vec::new(); for mut item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "item".to_string())], "); }", ContainerPrefixLocation::PerConv))
                        },
                        "Slice" => {
-                               Some(("Vec::new(); for item in ", vec![(format!(".iter() {{ local_{}.push(", var_name), "**item".to_string())], "); }", ContainerPrefixLocation::PerConv))
+                               Some(("Vec::new(); for item in ", vec![(format!(".iter() {{ local_{}.push(", var_name), "*item".to_string())], "); }", ContainerPrefixLocation::PerConv))
                        },
                        "Option" => {
                                if let Some(syn::Type::Path(p)) = single_contained {