From b4d880393c19d51e92256210c5ddc2aaec0e30ee Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 12 May 2024 14:35:21 +0000 Subject: [PATCH] Support clone for `ThreeBytes` --- 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 fb884c9..6cb8061 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -861,6 +861,7 @@ fn initial_clonable_types() -> HashSet { let mut res = HashSet::new(); res.insert("crate::c_types::U5".to_owned()); res.insert("crate::c_types::U128".to_owned()); + res.insert("crate::c_types::ThreeBytes".to_owned()); res.insert("crate::c_types::FourBytes".to_owned()); res.insert("crate::c_types::TwelveBytes".to_owned()); res.insert("crate::c_types::SixteenBytes".to_owned()); diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index bae1c40..d4f4faf 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -774,6 +774,7 @@ pub struct ThirtyTwoBytes { pub data: [u8; 32], } +#[derive(Clone)] #[repr(C)] /// A 3-byte byte array. pub struct ThreeBytes { /** The three bytes */ pub data: [u8; 3], } -- 2.39.5