bors abc115972e Auto merge of #12439 - arlosi:registry-multiple-warning, r=ehuss
Fix printing multiple warning messages for unused fields in [registries] table

Cargo currently prints the same warning message multiple times for unexpected fields in the `[registries.<registry>]` or `[registry]` tables. This is because Cargo warns each time that the structure is deserialized from `Config`. Depending on which code path is taken I've seen the warning printed up to 6 times.

* A cache of deserialized registry configurations is added to the `Config` struct.
* Registry authentication is changed to directly read the config when searching for a registry name, rather than deserializing each registry configuration.

A test is added to ensure both `[registries]` and `[registry]` only warn once for unexpected fields.
2023-08-06 18:29:22 +00:00
..
2022-07-30 19:36:58 -07:00