File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ pub struct Package {
570
570
features : FeatureMap ,
571
571
local : bool ,
572
572
alternative : bool ,
573
- invalid_json : bool ,
573
+ invalid_index_line : bool ,
574
574
edition : Option < String > ,
575
575
resolver : Option < String > ,
576
576
proc_macro : bool ,
@@ -1251,7 +1251,7 @@ impl Package {
1251
1251
features : BTreeMap :: new ( ) ,
1252
1252
local : false ,
1253
1253
alternative : false ,
1254
- invalid_json : false ,
1254
+ invalid_index_line : false ,
1255
1255
edition : None ,
1256
1256
resolver : None ,
1257
1257
proc_macro : false ,
@@ -1422,8 +1422,8 @@ impl Package {
1422
1422
1423
1423
/// Causes the JSON line emitted in the index to be invalid, presumably
1424
1424
/// causing Cargo to skip over this version.
1425
- pub fn invalid_json ( & mut self , invalid : bool ) -> & mut Package {
1426
- self . invalid_json = invalid;
1425
+ pub fn invalid_index_line ( & mut self , invalid : bool ) -> & mut Package {
1426
+ self . invalid_index_line = invalid;
1427
1427
self
1428
1428
}
1429
1429
@@ -1496,7 +1496,7 @@ impl Package {
1496
1496
let c = t ! ( fs:: read( & self . archive_dst( ) ) ) ;
1497
1497
cksum ( & c)
1498
1498
} ;
1499
- let name = if self . invalid_json {
1499
+ let name = if self . invalid_index_line {
1500
1500
serde_json:: json!( 1 )
1501
1501
} else {
1502
1502
serde_json:: json!( self . name)
Original file line number Diff line number Diff line change @@ -2916,7 +2916,9 @@ fn ignore_invalid_json_lines_git() {
2916
2916
2917
2917
fn ignore_invalid_json_lines ( ) {
2918
2918
Package :: new ( "foo" , "0.1.0" ) . publish ( ) ;
2919
- Package :: new ( "foo" , "0.1.1" ) . invalid_json ( true ) . publish ( ) ;
2919
+ Package :: new ( "foo" , "0.1.1" )
2920
+ . invalid_index_line ( true )
2921
+ . publish ( ) ;
2920
2922
Package :: new ( "foo" , "0.2.0" ) . publish ( ) ;
2921
2923
2922
2924
let p = project ( )
You can’t perform that action at this time.
0 commit comments