Skip to content

Commit

Permalink
const ORIGINAL_MANIFEST_FILE: &str = "Cargo.toml.orig";
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyBanks committed Apr 11, 2022
1 parent 4242406 commit e71fb81
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cargo/ops/cargo_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub struct PackageOpts<'cfg> {
pub cli_features: CliFeatures,
}

const ORIGINAL_MANIFEST_FILE: &str = "Cargo.toml.orig";
const VCS_INFO_FILE: &str = ".cargo_vcs_info.json";

struct ArchiveFile {
Expand Down Expand Up @@ -219,8 +220,8 @@ fn build_ar_list(
match rel_str.as_ref() {
"Cargo.toml" => {
result.push(ArchiveFile {
rel_path: PathBuf::from("Cargo.toml.orig"),
rel_str: "Cargo.toml.orig".to_string(),
rel_path: PathBuf::from(ORIGINAL_MANIFEST_FILE),
rel_str: ORIGINAL_MANIFEST_FILE.to_string(),
contents: FileContents::OnDisk(src_file),
});
result.push(ArchiveFile {
Expand All @@ -230,9 +231,8 @@ fn build_ar_list(
});
}
"Cargo.lock" => continue,
VCS_INFO_FILE | "Cargo.toml.orig" => anyhow::bail!(
"invalid inclusion of reserved file name \
{} in package source",
VCS_INFO_FILE | ORIGINAL_MANIFEST_FILE => anyhow::bail!(
"invalid inclusion of reserved file name {} in package source",
rel_str
),
_ => {
Expand Down

0 comments on commit e71fb81

Please sign in to comment.