message: Split derive_coerce_impl function
  Summary: Split long function.
diff: @@ -42,9 +42,16 @@ pub fn derive_coerce(input: proc_macro::TokenStream) -> proc_macro::TokenStream
  fn derive_coerce_impl(input: DeriveInput) -> syn::Result<proc_macro2::TokenStream> {
  check_repr(&input)?;
  + if input.generics.type_params().count() == 0 {
  + derive_coerce_inner(input)
  + } else {
  + derive_coerce_params(input)
  + }
  +}
  +
  +fn derive_coerce_inner(input: DeriveInput) -> syn::Result<proc_macro2::TokenStream> {
  let lifetimes = input.generics.lifetimes().collect::<Vec<_>>();
  - if input.generics.type_params().count() == 0 {
  let field = match &input.data {
  Data::Struct(x) if x.fields.len() == 1 => x.fields.iter().next().unwrap(),
  _ => {
  @@ -61,7 +68,11 @@ fn derive_coerce_impl(input: DeriveInput) -> syn::Result<proc_macro2::TokenStrea
  unsafe impl < #(#lifetimes),* > gazebo::coerce::Coerce<#type1< #(#lifetimes),* >> for #type2 {}
  unsafe impl < #(#lifetimes),* > gazebo::coerce::Coerce<#type2> for #type1< #(#lifetimes),* > {}
  })
  - } else {
  +}
  +
  +fn derive_coerce_params(input: DeriveInput) -> syn::Result<proc_macro2::TokenStream> {
  + let lifetimes = input.generics.lifetimes().collect::<Vec<_>>();
  +
  // unsafe impl <To__T, From__T> Coerce<X<To__T>> X<From__T> where ...
  let name = &input.ident;
  let mut ty_args = HashSet::new();
  @@ -119,7 +130,6 @@ fn derive_coerce_impl(input: DeriveInput) -> syn::Result<proc_macro2::TokenStrea
  where #(#constraints,)* {}
  })
  }
  -}
  fn replace_type(ty: &mut Type, idents: &HashSet<Ident>, prefix: &str) -> Option<()> {
  match ty {
  