Use &VersionReq for param version_req of fetch_crate_cratesio

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-08-07 18:41:23 +10:00
parent 497ef80b27
commit 686cae6ae8
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -4,6 +4,7 @@ use cargo_toml::Manifest;
use crates_io_api::AsyncClient;
use log::debug;
use reqwest::Client;
use semver::VersionReq;
use url::Url;
use super::find_version;
@ -19,7 +20,7 @@ pub async fn fetch_crate_cratesio(
client: &Client,
crates_io_api_client: &AsyncClient,
name: &str,
version_req: &str,
version_req: &VersionReq,
) -> Result<Manifest<Meta>, BinstallError> {
// Fetch / update index
debug!("Looking up crate information");