X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Fmain.rs;fp=c-bindings-gen%2Fsrc%2Fmain.rs;h=4572f7d921d405256d67b50d7616cacf8461aa7f;hp=5b432d3c20070cac8a7ee9cf541ff7876cd97aa6;hb=8fc17a2e5daa8f6f7c515639d2cb7ffea5221406;hpb=e8ac9011500460f5d13174c6bad634aa69de154e diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index 5b432d3..4572f7d 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -1300,8 +1300,8 @@ fn writeln_impl(w: &mut W, w_uses: &mut HashSet {} {{\n", ident, ident).unwrap(); write!(w, "\t{} {{ inner: ObjOps::heap_alloc(Default::default()), is_owned: true }}\n", ident).unwrap(); write!(w, "}}\n").unwrap(); - } else if path_matches_nongeneric(&trait_path.1, &["core", "cmp", "PartialEq"]) { - } else if path_matches_nongeneric(&trait_path.1, &["core", "cmp", "Eq"]) { + } else if full_trait_path_opt.as_ref().map(|s| s.as_str()) == Some("core::cmp::PartialEq") { + } else if full_trait_path_opt.as_ref().map(|s| s.as_str()) == Some("core::cmp::Eq") { writeln!(w, "/// Checks if two {}s contain equal inner contents.", ident).unwrap(); writeln!(w, "/// This ignores pointers and is_owned flags and looks at the values in fields.").unwrap(); if types.c_type_has_inner_from_path(&resolved_path) { @@ -1327,7 +1327,7 @@ fn writeln_impl(w: &mut W, w_uses: &mut HashSet u64 {{\n", ident, ident).unwrap(); if types.c_type_has_inner_from_path(&resolved_path) { @@ -1347,8 +1347,8 @@ fn writeln_impl(w: &mut W, w_uses: &mut HashSet Self {{").unwrap(); writeln!(w, "\t\tSelf {{").unwrap(); @@ -1401,7 +1401,7 @@ fn writeln_impl(w: &mut W, w_uses: &mut HashSet Str {{", ident).unwrap();