fn produce_context(&self) -> CargoResult<CrateContext> {
    let DependencySet {
      build_deps,
      dev_deps,
      normal_deps,
    } = self.produce_deps()?;

    let mut targets = self.produce_targets()?;
    let build_script_target_opt = self.take_build_script_target(&mut targets);

    let package = self.crate_catalog_entry.package();
    let mut lib_target_name = None;
    {
      for target in &targets {
        if target.kind == "lib" || target.kind == "proc-macro" {
          lib_target_name = Some(target.name.clone());
          break;
        }
      }
    }
    Ok(CrateContext {
      pkg_name: package.name.clone(),
      pkg_version: package.version.clone(),
      edition: package.edition.clone(),
      licenses: self.produce_licenses(),
      features: self.node.features.clone().unwrap_or_default(),
      is_root_dependency: self.crate_catalog_entry.is_root_dep(),
      dependencies: normal_deps,
      build_dependencies: build_deps,
      dev_dependencies: dev_deps,
      workspace_path_to_crate: self.crate_catalog_entry.workspace_path(&self.settings),
      build_script_target: build_script_target_opt,
      raze_settings: self.crate_settings.clone(),
      source_details: self.produce_source_details(),
      expected_build_path: self.crate_catalog_entry.local_build_path(&self.settings),
      sha256: package.sha256.clone(),
      lib_target_name,
      targets,
    })
  }
/** Builds a crate context from internal state. */
Builds a crate context from internal state.
Builds a crate context from internal state .
fn produce_context(&self) -> CargoResult<CrateContext> {
    let DependencySet {
      build_deps,
      dev_deps,
      normal_deps,
    } = self.produce_deps()?;
    let mut targets = self.produce_targets()?;
    let build_script_target_opt = self.take_build_script_target(&mut targets);
    let package = self.crate_catalog_entry.package();
    let mut lib_target_name = None;
    {
      for target in &targets {
        if target.kind == "lib" || target.kind == "proc-macro" {
          lib_target_name = Some(target.name.clone());
          break;
        }
      }
    }
    Ok(CrateContext {
      pkg_name: package.name.clone(),
      pkg_version: package.version.clone(),
      edition: package.edition.clone(),
      licenses: self.produce_licenses(),
      features: self.node.features.clone().unwrap_or_default(),
      is_root_dependency: self.crate_catalog_entry.is_root_dep(),
      dependencies: normal_deps,
      build_dependencies: build_deps,
      dev_dependencies: dev_deps,
      workspace_path_to_crate: self.crate_catalog_entry.workspace_path(&self.settings),
      build_script_target: build_script_target_opt,
      raze_settings: self.crate_settings.clone(),
      source_details: self.produce_source_details(),
      expected_build_path: self.crate_catalog_entry.local_build_path(&self.settings),
      sha256: package.sha256.clone(),
      lib_target_name,
      targets,
    })
  }
fn produce_context ( & self ) -> CargoResult < CrateContext > { let DependencySet { build_deps , dev_deps , normal_deps , } = self . produce_deps ( ) ? ; let mut targets = self . produce_targets ( ) ? ; let build_script_target_opt = self . take_build_script_target ( & mut targets ) ; let package = self . crate_catalog_entry . package ( ) ; let mut lib_target_name = None ; { for target in & targets { if target . kind == " " || target . kind == " " { lib_target_name = Some ( target . name . clone ( ) ) ; break ; } } } Ok ( CrateContext { pkg_name : package . name . clone ( ) , pkg_version : package . version . clone ( ) , edition : package . edition . clone ( ) , licenses : self . produce_licenses ( ) , features : self . node . features . clone ( ) . unwrap_or_default ( ) , is_root_dependency : self . crate_catalog_entry . is_root_dep ( ) , dependencies : normal_deps , build_dependencies : build_deps , dev_dependencies : dev_deps , workspace_path_to_crate : self . crate_catalog_entry . workspace_path ( & self . settings ) , build_script_target : build_script_target_opt , raze_settings : self . crate_settings . clone ( ) , source_details : self . produce_source_details ( ) , expected_build_path : self . crate_catalog_entry . local_build_path ( & self . settings ) , sha256 : package . sha256 . clone ( ) , lib_target_name , targets , } ) }
Builds a crate context from internal state.
Builds a crate context from internal state .
&self