[bindings] Fix CVecTempl clone operation behavior.
authorMatt Corallo <git@bluematt.me>
Tue, 20 Oct 2020 17:59:02 +0000 (13:59 -0400)
committerMatt Corallo <git@bluematt.me>
Mon, 23 Nov 2020 16:08:34 +0000 (11:08 -0500)
commitfaa8ec5c21e685942e5bcafbe74c1f1ce7d54747
treea1e546f5daf680f003e3fd328b50caeaed18ed4e
parent336cb0828abf57424d9547323097603d509139e7
[bindings] Fix CVecTempl clone operation behavior.

CVecTempl previously called Vec.clone_from_slice() on a
newly-allocated Vec, which immediately panics as
[T].clone_from_slice() requires that the Vec/target slice already
has the same length as the source slice. This should have been
Vec.extend_from_slice() which exhibits the correct behavior.
lightning-c-bindings/src/c_types/mod.rs