mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 05:28:42 +00:00
Use &VersionReq
for param version_req
of fetch_crate_cratesio
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
497ef80b27
commit
686cae6ae8
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue