From: Matt Corallo Date: Wed, 23 Mar 2022 03:38:15 +0000 (+0000) Subject: Consider all reference types clonable (because they are) X-Git-Tag: v0.0.105.2^2~2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=commitdiff_plain;h=291aea2200e01843623a67d42112500b1810d276 Consider all reference types clonable (because they are) --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 2efba6e..51a5dfc 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -772,6 +772,7 @@ impl<'a> CrateTypes<'a> { self.clonable_types.borrow_mut().insert(object); } pub fn is_clonable(&self, object: &str) -> bool { + object.starts_with("&'static ") || self.clonable_types.borrow().contains(object) } pub fn write_new_template(&self, mangled_container: String, has_destructor: bool, created_container: &[u8]) {