fn identify_named_deps(&self) -> CargoResult<DependencyNames> {
    // Resolve dependencies into types
    let mut build_dep_names = Vec::new();
    let mut dev_dep_names = Vec::new();
    let mut normal_dep_names = Vec::new();

    let platform_attrs = self.platform_details.attrs();
    let package = self.crate_catalog_entry.package();
    for dep in &package.dependencies {
      if dep.target.is_some() {
        // UNWRAP: Safe from above check
        let target_str = dep.target.as_ref().unwrap();
        let platform = Platform::from_str(target_str)?;

        // Skip this dep if it doesn't match our platform attributes
        if !platform.matches(&self.settings.target, platform_attrs.as_ref()) {
          continue;
        }
      }

      match dep.kind.as_deref() {
        None | Some("normal") => normal_dep_names.push(dep.name.clone()),
        Some("dev") => dev_dep_names.push(dep.name.clone()),
        Some("build") => build_dep_names.push(dep.name.clone()),
        something_else => {
          return Err(
            RazeError::Planning {
              dependency_name_opt: Some(package.name.to_string()),
              message: format!(
                "Unhandlable dependency type {:?} on {} detected! {}",
                something_else, dep.name, PLEASE_FILE_A_BUG
              ),
            }
            .into(),
          )
        }
      }
    }

    Ok(DependencyNames {
      build_dep_names,
      dev_dep_names,
      normal_dep_names,
    })
  }
/** Yields the list of dependencies as described by the manifest (without version). */
Yields the list of dependencies as described by the manifest (without version).
Yields the list of dependencies as described by the manifest ( without version ) .
fn identify_named_deps(&self) -> CargoResult<DependencyNames> {
    // Resolve dependencies into types
    let mut build_dep_names = Vec::new();
    let mut dev_dep_names = Vec::new();
    let mut normal_dep_names = Vec::new();
    let platform_attrs = self.platform_details.attrs();
    let package = self.crate_catalog_entry.package();
    for dep in &package.dependencies {
      if dep.target.is_some() {
        // UNWRAP: Safe from above check
        let target_str = dep.target.as_ref().unwrap();
        let platform = Platform::from_str(target_str)?;
        // Skip this dep if it doesn't match our platform attributes
        if !platform.matches(&self.settings.target, platform_attrs.as_ref()) {
          continue;
        }
      }
      match dep.kind.as_deref() {
        None | Some("normal") => normal_dep_names.push(dep.name.clone()),
        Some("dev") => dev_dep_names.push(dep.name.clone()),
        Some("build") => build_dep_names.push(dep.name.clone()),
        something_else => {
          return Err(
            RazeError::Planning {
              dependency_name_opt: Some(package.name.to_string()),
              message: format!(
                "Unhandlable dependency type {:?} on {} detected! {}",
                something_else, dep.name, PLEASE_FILE_A_BUG
              ),
            }
            .into(),
          )
        }
      }
    }
    Ok(DependencyNames {
      build_dep_names,
      dev_dep_names,
      normal_dep_names,
    })
  }
fn identify_named_deps ( & self ) -> CargoResult < DependencyNames > { // Resolve dependencies into types let mut build_dep_names = Vec :: new ( ) ; let mut dev_dep_names = Vec :: new ( ) ; let mut normal_dep_names = Vec :: new ( ) ; let platform_attrs = self . platform_details . attrs ( ) ; let package = self . crate_catalog_entry . package ( ) ; for dep in & package . dependencies { if dep . target . is_some ( ) { // UNWRAP: Safe from above check let target_str = dep . target . as_ref ( ) . unwrap ( ) ; let platform = Platform :: from_str ( target_str ) ? ; // Skip this dep if it doesn't match our platform attributes if ! platform . matches ( & self . settings . target , platform_attrs . as_ref ( ) ) { continue ; } } match dep . kind . as_deref ( ) { None | Some ( " " ) => normal_dep_names . push ( dep . name . clone ( ) ) , Some ( " " ) => dev_dep_names . push ( dep . name . clone ( ) ) , Some ( " " ) => build_dep_names . push ( dep . name . clone ( ) ) , something_else => { return Err ( RazeError :: Planning { dependency_name_opt : Some ( package . name . to_string ( ) ) , message : format ! ( " " something_else dep name PLEASE_FILE_A_BUG ) , } . into ( ) , ) } } } Ok ( DependencyNames { build_dep_names , dev_dep_names , normal_dep_names , } ) }
Yields the list of dependencies as described by the manifest (without version).
Yields the list of dependencies as described by the manifest ( without version ) .
&self