fn produce_crate_contexts(&self) -> CargoResult<Vec<CrateContext>> {
    self
      .metadata
      .resolve
      .nodes
      .iter()
      .sorted_by_key(|n| &n.id)
      .filter_map(|node| {
        // UNWRAP: Node packages guaranteed to exist by guard in `produce_planned_build`
        let own_crate_catalog_entry = self.crate_catalog.entry_for_package_id(&node.id).unwrap();
        let own_package = own_crate_catalog_entry.package();

        // Skip the root package (which is probably a junk package, by convention)
        if own_crate_catalog_entry.is_root() {
          return None;
        }

        // Skip workspace crates, since we haven't yet decided how they should be handled.
        //
        // Hey you, reader! If you have opinions about this please comment on the below bug, or file
        // another bug.
        // See Also: https://github.com/google/cargo-raze/issues/111
        if own_crate_catalog_entry.is_workspace_crate() {
          return None;
        }

        let crate_settings = self
          .settings
          .crates
          .get(&own_package.name)
          .and_then(|c| c.get(&own_package.version))
          .cloned()
          .unwrap_or_else(CrateSettings::default);

        // UNWRAP: Safe given unwrap during serialize step of metadata
        let own_source_id = own_package
          .source
          .as_ref()
          .map(|s| SourceId::from_url(&s).unwrap());

        let crate_subplanner = CrateSubplanner {
          crate_catalog: &self.crate_catalog,
          settings: self.settings,
          platform_details: self.platform_details,
          crate_catalog_entry: &own_crate_catalog_entry,
          source_id: &own_source_id,
          node: &node,
          crate_settings: &crate_settings,
        };

        Some(crate_subplanner.produce_context())
      })
      .collect()
  }
/** Produces a crate context for each declared crate and dependency. */
Produces a crate context for each declared crate and dependency.
Produces a crate context for each declared crate and dependency .
fn produce_crate_contexts(&self) -> CargoResult<Vec<CrateContext>> {
    self
      .metadata
      .resolve
      .nodes
      .iter()
      .sorted_by_key(|n| &n.id)
      .filter_map(|node| {
        // UNWRAP: Node packages guaranteed to exist by guard in `produce_planned_build`
        let own_crate_catalog_entry = self.crate_catalog.entry_for_package_id(&node.id).unwrap();
        let own_package = own_crate_catalog_entry.package();
        // Skip the root package (which is probably a junk package, by convention)
        if own_crate_catalog_entry.is_root() {
          return None;
        }
        // Skip workspace crates, since we haven't yet decided how they should be handled.
        //
        // Hey you, reader! If you have opinions about this please comment on the below bug, or file
        // another bug.
        // See Also: https://github.com/google/cargo-raze/issues/111
        if own_crate_catalog_entry.is_workspace_crate() {
          return None;
        }
        let crate_settings = self
          .settings
          .crates
          .get(&own_package.name)
          .and_then(|c| c.get(&own_package.version))
          .cloned()
          .unwrap_or_else(CrateSettings::default);
        // UNWRAP: Safe given unwrap during serialize step of metadata
        let own_source_id = own_package
          .source
          .as_ref()
          .map(|s| SourceId::from_url(&s).unwrap());
        let crate_subplanner = CrateSubplanner {
          crate_catalog: &self.crate_catalog,
          settings: self.settings,
          platform_details: self.platform_details,
          crate_catalog_entry: &own_crate_catalog_entry,
          source_id: &own_source_id,
          node: &node,
          crate_settings: &crate_settings,
        };
        Some(crate_subplanner.produce_context())
      })
      .collect()
  }
fn produce_crate_contexts ( & self ) -> CargoResult < Vec < CrateContext > > { self . metadata . resolve . nodes . iter ( ) . sorted_by_key ( | n | & n . id ) . filter_map ( | node | { // UNWRAP: Node packages guaranteed to exist by guard in `produce_planned_build` let own_crate_catalog_entry = self . crate_catalog . entry_for_package_id ( & node . id ) . unwrap ( ) ; let own_package = own_crate_catalog_entry . package ( ) ; // Skip the root package (which is probably a junk package, by convention) if own_crate_catalog_entry . is_root ( ) { return None ; } // Skip workspace crates, since we haven't yet decided how they should be handled. // // Hey you, reader! If you have opinions about this please comment on the below bug, or file // another bug. // See Also: https://github.com/google/cargo-raze/issues/111 if own_crate_catalog_entry . is_workspace_crate ( ) { return None ; } let crate_settings = self . settings . crates . get ( & own_package . name ) . and_then ( | c | c . get ( & own_package . version ) ) . cloned ( ) . unwrap_or_else ( CrateSettings :: default ) ; // UNWRAP: Safe given unwrap during serialize step of metadata let own_source_id = own_package . source . as_ref ( ) . map ( | s | SourceId :: from_url ( & s ) . unwrap ( ) ) ; let crate_subplanner = CrateSubplanner { crate_catalog : & self . crate_catalog , settings : self . settings , platform_details : self . platform_details , crate_catalog_entry : & own_crate_catalog_entry , source_id : & own_source_id , node : & node , crate_settings : & crate_settings , } ; Some ( crate_subplanner . produce_context ( ) ) } ) . collect ( ) }
Produces a crate context for each declared crate and dependency.
Produces a crate context for each declared crate and dependency .
&self