From 5f6a53d54a93ba52f9f06f1a43f615facad6f471 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 3 Mar 2022 03:20:07 +0000 Subject: [PATCH] Implement `Clone` for `SecretKey` --- c-bindings-gen/src/types.rs | 1 + lightning-c-bindings/src/c_types/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index aebeb48..346f588 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -723,6 +723,7 @@ fn initial_clonable_types() -> HashSet { 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()); diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 0bd976b..f31d55b 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -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 -- 2.30.2