Closed
Description
Now, that alternative registries have been stabilized, they are referenced by the index URL, which is definitely unique. However, it is not necessarily a human-friendly and may be quite long at times.
crates.io, on the other hand, is called just that - "crates.io".
Here is how it shows when running cargo update
$ cargo update
Updating crates.io index
Updating `https://gitlab.com/xxx/cargo/crates-index` index
The index URL is listed only in the .cargo/config
and not in Cargo.toml
, so it may be not readily recognizable by the user and/or linked to the alternative registry in use (especially if a number of different alt registries are in use simultaneously)
I suggest to use the name of the registry instead and fallback to the URL only when the name is None
(it is defined as Option<String>
)