mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-17 17:30:03 +00:00
Merge branch 'main' into feature/bin-multi-targets
This commit is contained in:
commit
6f7c8fa8ab
5 changed files with 69 additions and 30 deletions
src/fetchers
|
@ -1,4 +1,5 @@
|
|||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
|
||||
use log::{debug, info, warn};
|
||||
use reqwest::Method;
|
||||
|
@ -22,8 +23,8 @@ impl GhCrateMeta {
|
|||
|
||||
#[async_trait::async_trait]
|
||||
impl super::Fetcher for GhCrateMeta {
|
||||
async fn new(data: &Data) -> Box<Self> {
|
||||
Box::new(Self { data: data.clone() })
|
||||
async fn new(data: &Data) -> Arc<Self> {
|
||||
Arc::new(Self { data: data.clone() })
|
||||
}
|
||||
|
||||
async fn check(&self) -> Result<bool, BinstallError> {
|
||||
|
@ -36,7 +37,7 @@ impl super::Fetcher for GhCrateMeta {
|
|||
}
|
||||
|
||||
info!("Checking for package at: '{url}'");
|
||||
remote_exists(url.as_str(), Method::HEAD).await
|
||||
remote_exists(url, Method::HEAD).await
|
||||
}
|
||||
|
||||
async fn fetch(&self, dst: &Path) -> Result<(), BinstallError> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue