fn produce_crate_contexts(&self) -> Result<CrateContextProduction> {
    let contexts = self
      .crate_catalog
      .metadata
      .resolve
      .as_ref()
      .ok_or_else(|| RazeError::Generic("Missing resolve graph".into()))?
      .nodes
      .iter()
      .sorted_by_key(|n| &n.id)
      .filter_map(|node| self.create_crate_context(node, self.crate_catalog))
      .collect::<Result<Vec<_>>>()?;

    let root_ctxs = contexts
      .iter()
      .filter_map(|(ctx, is_workspace)| match is_workspace {
        true => Some(ctx.default_deps.aliased_dependencies.clone()),
        false => None,
      })
      .flatten()
      .collect::<BTreeMap<_, _>>();

    let contexts = contexts.into_iter().map(|(ctx, _)| ctx).collect_vec();
    let aliases = self.produce_workspace_aliases(root_ctxs, &contexts);

    Ok((contexts, aliases))
  }
/// 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) -> Result<CrateContextProduction> {
    let contexts = self
      .crate_catalog
      .metadata
      .resolve
      .as_ref()
      .ok_or_else(|| RazeError::Generic("Missing resolve graph".into()))?
      .nodes
      .iter()
      .sorted_by_key(|n| &n.id)
      .filter_map(|node| self.create_crate_context(node, self.crate_catalog))
      .collect::<Result<Vec<_>>>()?;
    let root_ctxs = contexts
      .iter()
      .filter_map(|(ctx, is_workspace)| match is_workspace {
        true => Some(ctx.default_deps.aliased_dependencies.clone()),
        false => None,
      })
      .flatten()
      .collect::<BTreeMap<_, _>>();
    let contexts = contexts.into_iter().map(|(ctx, _)| ctx).collect_vec();
    let aliases = self.produce_workspace_aliases(root_ctxs, &contexts);
    Ok((contexts, aliases))
  }
fn produce_crate_contexts ( & self ) -> Result < CrateContextProduction > { let contexts = self . crate_catalog . metadata . resolve . as_ref ( ) . ok_or_else ( | | RazeError :: Generic ( " " . into ( ) ) ) ? . nodes . iter ( ) . sorted_by_key ( | n | & n . id ) . filter_map ( | node | self . create_crate_context ( node , self . crate_catalog ) ) . collect :: < Result < Vec < _ > > > ( ) ? ; let root_ctxs = contexts . iter ( ) . filter_map ( | ( ctx , is_workspace ) | match is_workspace { true => Some ( ctx . default_deps . aliased_dependencies . clone ( ) ) , false => None , } ) . flatten ( ) . collect :: < BTreeMap < _ , _ > > ( ) ; let contexts = contexts . into_iter ( ) . map ( | ( ctx , _ ) | ctx ) . collect_vec ( ) ; let aliases = self . produce_workspace_aliases ( root_ctxs , & contexts ) ; Ok ( ( contexts , aliases ) ) }
Produces a crate context for each declared crate and dependency.
Produces a crate context for each declared crate and dependency .
&self
&self