fn is_proc_macro(&self, dep_package: &Package) -> bool {
    dep_package
      .targets
      .iter()
      .flat_map(|target| target.crate_types.iter())
      .any(|crate_type| crate_type.as_str() == "proc-macro")
  }
/// Test if the given dep details pertain to it being a proc-macro
///
/// Implicitly dependencies are on the [lib] target from Cargo.toml (of which there is guaranteed
/// to be at most one).
///
/// We don't explicitly narrow to be considering only the [lib] Target - we rely on the fact that
/// only one [lib] is allowed in a Package, and so treat the Package synonymously with the [lib]
/// Target therein. Only the [lib] target is allowed to be labelled as a proc-macro, so checking
/// if "any" target is a proc-macro is equivalent to checking if the [lib] target is a proc-macro
/// (and accordingly, whether we need to treat this dep like a proc-macro).
Test if the given dep details pertain to it being a proc-macro
Implicitly dependencies are on the [lib] target from Cargo.toml (of which there is guaranteed
to be at most one).

We don't explicitly narrow to be considering only the [lib] Target - we rely on the fact that
only one [lib] is allowed in a Package, and so treat the Package synonymously with the [lib]
Target therein. Only the [lib] target is allowed to be labelled as a proc-macro, so checking
if "any" target is a proc-macro is equivalent to checking if the [lib] target is a proc-macro
(and accordingly, whether we need to treat this dep like a proc-macro).
Test if the given dep details pertain to it being a proc - macro Implicitly dependencies are on the [ lib ] target from Cargo . toml ( of which there is guaranteed to be at most one ) . We don ' t explicitly narrow to be considering only the [ lib ] Target - we rely on the fact that only one [ lib ] is allowed in a Package and so treat the Package synonymously with the [ lib ] Target therein . Only the [ lib ] target is allowed to be labelled as a proc - macro so checking if " any " target is a proc - macro is equivalent to checking if the [ lib ] target is a proc - macro ( and accordingly whether we need to treat this dep like a proc - macro ) .
fn is_proc_macro(&self, dep_package: &Package) -> bool {
    dep_package
      .targets
      .iter()
      .flat_map(|target| target.crate_types.iter())
      .any(|crate_type| crate_type.as_str() == "proc-macro")
  }
fn is_proc_macro ( & self , dep_package : & Package ) -> bool { dep_package . targets . iter ( ) . flat_map ( | target | target . crate_types . iter ( ) ) . any ( | crate_type | crate_type . as_str ( ) == " " ) }
Test if the given dep details pertain to it being a proc-macro
Implicitly dependencies are on the [lib] target from Cargo.toml (of which there is guaranteed
to be at most one).
Test if the given dep details pertain to it being a proc - macro Implicitly dependencies are on the [ lib ] target from Cargo . toml ( of which there is guaranteed to be at most one ) .
&self
dep_package
&Package
&self
dep_package
&Package