@@ -1464,19 +1464,19 @@ impl GlobalContext {
1464
1464
. with_context ( || format ! ( "failed to load config from `{}`" , str_path) ) ?
1465
1465
} else {
1466
1466
let doc = toml_dotted_keys ( arg) ?;
1467
- let toml_v : toml:: Value = toml:: Value :: deserialize ( doc. into_deserializer ( ) )
1467
+ let doc : toml:: Value = toml:: Value :: deserialize ( doc. into_deserializer ( ) )
1468
1468
. with_context ( || {
1469
1469
format ! ( "failed to parse value from --config argument `{arg}`" )
1470
1470
} ) ?;
1471
1471
1472
- if toml_v
1472
+ if doc
1473
1473
. get ( "registry" )
1474
1474
. and_then ( |v| v. as_table ( ) )
1475
1475
. and_then ( |t| t. get ( "token" ) )
1476
1476
. is_some ( )
1477
1477
{
1478
1478
bail ! ( "registry.token cannot be set through --config for security reasons" ) ;
1479
- } else if let Some ( ( k, _) ) = toml_v
1479
+ } else if let Some ( ( k, _) ) = doc
1480
1480
. get ( "registries" )
1481
1481
. and_then ( |v| v. as_table ( ) )
1482
1482
. and_then ( |t| t. iter ( ) . find ( |( _, v) | v. get ( "token" ) . is_some ( ) ) )
@@ -1487,7 +1487,7 @@ impl GlobalContext {
1487
1487
) ;
1488
1488
}
1489
1489
1490
- if toml_v
1490
+ if doc
1491
1491
. get ( "registry" )
1492
1492
. and_then ( |v| v. as_table ( ) )
1493
1493
. and_then ( |t| t. get ( "secret-key" ) )
@@ -1496,7 +1496,7 @@ impl GlobalContext {
1496
1496
bail ! (
1497
1497
"registry.secret-key cannot be set through --config for security reasons"
1498
1498
) ;
1499
- } else if let Some ( ( k, _) ) = toml_v
1499
+ } else if let Some ( ( k, _) ) = doc
1500
1500
. get ( "registries" )
1501
1501
. and_then ( |v| v. as_table ( ) )
1502
1502
. and_then ( |t| t. iter ( ) . find ( |( _, v) | v. get ( "secret-key" ) . is_some ( ) ) )
@@ -1507,7 +1507,7 @@ impl GlobalContext {
1507
1507
) ;
1508
1508
}
1509
1509
1510
- CV :: from_toml ( Definition :: Cli ( None ) , toml_v )
1510
+ CV :: from_toml ( Definition :: Cli ( None ) , doc )
1511
1511
. with_context ( || format ! ( "failed to convert --config argument `{arg}`" ) ) ?
1512
1512
} ;
1513
1513
let tmp_table = self
0 commit comments