X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=99b333c01d5fbfc723a9e11a11d6b191bbf84bf7;hb=15635d01527607e724993ee20bab906ef22d832c;hp=0ff81f8132d81f748045b080c1f7932b7cfa6992;hpb=48e3445a78b643c837e7d489d90588eb877d0319;p=ldk-c-bindings diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 0ff81f8..99b333c 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -354,7 +354,6 @@ impl<'a, 'p: 'a> GenericTypes<'a, 'p> { for bound in bounds_iter { if let syn::TypeParamBound::Trait(t) = bound { // We only allow for `?Sized` here. - if let syn::TraitBoundModifier::Maybe(_) = t.modifier {} else { panic!(); } assert_eq!(t.path.segments.len(), 1); assert_eq!(format!("{}", t.path.segments[0].ident), "Sized"); } @@ -549,6 +548,7 @@ impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr Self::insert_primitive(&mut imports, "bool"); Self::insert_primitive(&mut imports, "u128"); Self::insert_primitive(&mut imports, "i64"); + Self::insert_primitive(&mut imports, "f64"); Self::insert_primitive(&mut imports, "u64"); Self::insert_primitive(&mut imports, "u32"); Self::insert_primitive(&mut imports, "u16"); @@ -951,6 +951,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { match full_path { "bool" => true, "i64" => true, + "f64" => true, "u64" => true, "u32" => true, "u16" => true,