File tree 1 file changed +5
-5
lines changed
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> {
36
36
pub cli_features : CliFeatures ,
37
37
}
38
38
39
+ const ORIGINAL_MANIFEST_FILE : & str = "Cargo.toml.orig" ;
39
40
const VCS_INFO_FILE : & str = ".cargo_vcs_info.json" ;
40
41
41
42
struct ArchiveFile {
@@ -219,8 +220,8 @@ fn build_ar_list(
219
220
match rel_str. as_ref ( ) {
220
221
"Cargo.toml" => {
221
222
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 ( ) ,
224
225
contents : FileContents :: OnDisk ( src_file) ,
225
226
} ) ;
226
227
result. push ( ArchiveFile {
@@ -230,9 +231,8 @@ fn build_ar_list(
230
231
} ) ;
231
232
}
232
233
"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" ,
236
236
rel_str
237
237
) ,
238
238
_ => {
You can’t perform that action at this time.
0 commit comments