pub fn check_all_vendored(crate_catalog_entries: &[CrateCatalogEntry]) -> CargoResult<()> {
    let missing_package_ident_iter = crate_catalog_entries
      .iter()
      // Root does not need to be vendored -- usually it is a wrapper package.
      .filter(|p| !p.is_root())
      .filter(|p| !p.is_workspace_crate())
      .filter(|p| fs::metadata(p.expected_vendored_path()).is_err())
      .map(|p| p.package_ident.clone());

    let limited_missing_crates = collect_up_to(
      MAX_DISPLAYED_MISSING_VENDORED_CRATES,
      missing_package_ident_iter,
    );

    if limited_missing_crates.is_empty() {
      return Ok(());
    }

    // Oops, missing some crates. Yield a nice message
    let expected_full_path = env::current_dir()
      .unwrap()
      .join(format!("./{}", VENDOR_DIR));

    Err(RazeError::Planning {
      dependency_name_opt: None,
      message: format!(
        "Failed to find expected vendored crates in {:?}: {:?}. Did you forget to run cargo vendor?",
        expected_full_path.to_str(),
        limited_missing_crates)
      }.into())
  }
// Verifies that all provided packages are vendored (in VENDOR_DIR relative to CWD)
Verifies that all provided packages are vendored (in VENDOR_DIR relative to CWD)
Verifies that all provided packages are vendored ( in VENDOR_DIR relative to CWD )
pub fn check_all_vendored(crate_catalog_entries: &[CrateCatalogEntry]) -> CargoResult<()> {
    let missing_package_ident_iter = crate_catalog_entries
      .iter()
      // Root does not need to be vendored -- usually it is a wrapper package.
      .filter(|p| !p.is_root())
      .filter(|p| !p.is_workspace_crate())
      .filter(|p| fs::metadata(p.expected_vendored_path()).is_err())
      .map(|p| p.package_ident.clone());
    let limited_missing_crates = collect_up_to(
      MAX_DISPLAYED_MISSING_VENDORED_CRATES,
      missing_package_ident_iter,
    );
    if limited_missing_crates.is_empty() {
      return Ok(());
    }
    // Oops, missing some crates. Yield a nice message
    let expected_full_path = env::current_dir()
      .unwrap()
      .join(format!("./{}", VENDOR_DIR));
    Err(RazeError::Planning {
      dependency_name_opt: None,
      message: format!(
        "Failed to find expected vendored crates in {:?}: {:?}. Did you forget to run cargo vendor?",
        expected_full_path.to_str(),
        limited_missing_crates)
      }.into())
  }
pub fn check_all_vendored ( crate_catalog_entries : & [ CrateCatalogEntry ] ) -> CargoResult < ( ) > { let missing_package_ident_iter = crate_catalog_entries . iter ( ) // Root does not need to be vendored -- usually it is a wrapper package. . filter ( | p | ! p . is_root ( ) ) . filter ( | p | ! p . is_workspace_crate ( ) ) . filter ( | p | fs :: metadata ( p . expected_vendored_path ( ) ) . is_err ( ) ) . map ( | p | p . package_ident . clone ( ) ) ; let limited_missing_crates = collect_up_to ( MAX_DISPLAYED_MISSING_VENDORED_CRATES , missing_package_ident_iter , ) ; if limited_missing_crates . is_empty ( ) { return Ok ( ( ) ) ; } // Oops, missing some crates. Yield a nice message let expected_full_path = env :: current_dir ( ) . unwrap ( ) . join ( format ! ( " " VENDOR_DIR ) ) ; Err ( RazeError :: Planning { dependency_name_opt : None , message : format ! ( " " expected_full_path to_str ( ) limited_missing_crates ) } . into ( ) ) }
Verifies that all provided packages are vendored (in VENDOR_DIR relative to CWD)
Verifies that all provided packages are vendored ( in VENDOR_DIR relative to CWD )
crate_catalog_entries
&[CrateCatalogEntry]