Merge pull request #67 from TheBlueMatt/main
[ldk-c-bindings] / c-bindings-gen / src / types.rs
index 3309ee0ea31aaa4c076da34897ca5957485cc5d4..ced1f34b0e91c31493127c14bf8c9e7db31748ac 100644 (file)
@@ -772,7 +772,6 @@ 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]) {
@@ -2715,7 +2714,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
                                if !c_ty {
                                        self.write_rust_path(w, generics, path);
                                } else {
-                                       write!(w, "{}", full_path).unwrap();
+                                       // We shouldn't be mapping references in types, so panic here
+                                       unimplemented!();
                                }
                        } else if is_ref {
                                write!(w, "&{}{}{}", if is_mut { "mut " } else { "" }, crate_pfx, full_path).unwrap();