binstalk-registry: Use crates.io sparse index by default (#1314)

Fixed #1310

Also add rename `fetch_crate_cratesio` => `fetch_crate_cratesio_api` and
put it behind a new feature `crates_io_api`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-24 10:04:06 +10:00 committed by GitHub
parent 0a71b39c90
commit b9adaa006f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 10 deletions

View file

@ -105,7 +105,7 @@ async fn fetch_crate_cratesio_version_matched(
/// Find the crate by name, get its latest stable version matches `version_req`,
/// retrieve its Cargo.toml and infer all its bins.
pub async fn fetch_crate_cratesio(
pub async fn fetch_crate_cratesio_api(
client: Client,
name: &str,
version_req: &VersionReq,