Merge pull request #61 from TheBlueMatt/main v0.0.105.1
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Thu, 3 Mar 2022 06:52:50 +0000 (06:52 +0000)
committerGitHub <noreply@github.com>
Thu, 3 Mar 2022 06:52:50 +0000 (06:52 +0000)
Implement `Clone` for `SecretKey`

c-bindings-gen/src/types.rs
lightning-c-bindings/src/c_types/mod.rs

index aebeb487ece66605a3770677b9d386041bc29a13..346f588221fa91e0d50a8ee75014f3d60775e799 100644 (file)
@@ -723,6 +723,7 @@ fn initial_clonable_types() -> HashSet<String> {
        let mut res = HashSet::new();
        res.insert("crate::c_types::u5".to_owned());
        res.insert("crate::c_types::ThirtyTwoBytes".to_owned());
+       res.insert("crate::c_types::SecretKey".to_owned());
        res.insert("crate::c_types::PublicKey".to_owned());
        res.insert("crate::c_types::Transaction".to_owned());
        res.insert("crate::c_types::TxOut".to_owned());
index 0bd976bac8f1e47ee75ad5995a0bf123ce8f01dd..f31d55bd1b2c7d9ec67f30552f0036d27e5b28a6 100644 (file)
@@ -67,6 +67,7 @@ impl PublicKey {
 }
 
 #[repr(C)]
+#[derive(Clone)]
 /// Represents a valid secp256k1 secret key serialized as a 32 byte array.
 pub struct SecretKey {
        /// The bytes of the secret key