X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c-bindings-gen%2Fsrc%2Ftypes.rs;h=2cb93690095247845687370e2011220b3dda945f;hb=6c95131720d1d390bf006f5160dcf4aa878fa4f0;hp=edd993f9be137fa45d752dc51d01ba6538fc30eb;hpb=6bc13e0b08c637fa381718aefd6a34637beb3b0d;p=ldk-c-bindings diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index edd993f..2cb9369 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -194,6 +194,7 @@ impl<'a, 'p: 'a> GenericTypes<'a, 'p> { assert_simple_bound(&trait_bound); if let Some(mut path) = types.maybe_resolve_path(&trait_bound.path, None) { if types.skip_path(&path) { continue; } + if path == "Sized" { continue; } if non_lifetimes_processed { return false; } non_lifetimes_processed = true; let new_ident = if path != "std::ops::Deref" { @@ -223,6 +224,9 @@ impl<'a, 'p: 'a> GenericTypes<'a, 'p> { let mut non_lifetimes_processed = false; for bound in t.bounds.iter() { if let syn::TypeParamBound::Trait(trait_bound) = bound { + if let Some(id) = trait_bound.path.get_ident() { + if format!("{}", id) == "Sized" { continue; } + } if non_lifetimes_processed { return false; } non_lifetimes_processed = true; assert_simple_bound(&trait_bound);