File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ pub struct PackageOpts<'cfg> {
3636 pub cli_features : CliFeatures ,
3737}
3838
39+ const ORIGINAL_MANIFEST_FILE : & str = "Cargo.toml.orig" ;
3940const VCS_INFO_FILE : & str = ".cargo_vcs_info.json" ;
4041
4142struct ArchiveFile {
@@ -219,8 +220,8 @@ fn build_ar_list(
219220 match rel_str. as_ref ( ) {
220221 "Cargo.toml" => {
221222 result. push ( ArchiveFile {
222- rel_path : PathBuf :: from ( "Cargo.toml.orig" ) ,
223- rel_str : "Cargo.toml.orig" . to_string ( ) ,
223+ rel_path : PathBuf :: from ( ORIGINAL_MANIFEST_FILE ) ,
224+ rel_str : ORIGINAL_MANIFEST_FILE . to_string ( ) ,
224225 contents : FileContents :: OnDisk ( src_file) ,
225226 } ) ;
226227 result. push ( ArchiveFile {
@@ -230,9 +231,8 @@ fn build_ar_list(
230231 } ) ;
231232 }
232233 "Cargo.lock" => continue ,
233- VCS_INFO_FILE | "Cargo.toml.orig" => anyhow:: bail!(
234- "invalid inclusion of reserved file name \
235- {} in package source",
234+ VCS_INFO_FILE | ORIGINAL_MANIFEST_FILE => anyhow:: bail!(
235+ "invalid inclusion of reserved file name {} in package source" ,
236236 rel_str
237237 ) ,
238238 _ => {
You can’t perform that action at this time.
0 commit comments