From: Matt Corallo Date: Mon, 27 Feb 2023 21:45:29 +0000 (+0000) Subject: Ignore discriminants on enum variants X-Git-Tag: v0.0.114.0^2~9 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=420d87e49b2f4d94b64d7b27572295d0f75ff072;p=ldk-c-bindings Ignore discriminants on enum variants While this loses the value information, its better than failing to generate bindings at all. --- diff --git a/c-bindings-gen/src/main.rs b/c-bindings-gen/src/main.rs index ee800db..ffd293f 100644 --- a/c-bindings-gen/src/main.rs +++ b/c-bindings-gen/src/main.rs @@ -1733,7 +1733,6 @@ fn writeln_enum<'a, 'b, W: std::io::Write>(w: &mut W, e: &'a syn::ItemEnum, type write!(w, ")").unwrap(); } } - if var.discriminant.is_some() { unimplemented!(); } write!(&mut constr, ") -> {} {{\n\t{}::{}", e.ident, e.ident, var.ident).unwrap(); if let syn::Fields::Named(fields) = &var.fields { writeln!(&mut constr, " {{").unwrap();