mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-14 16:00:03 +00:00
Refactor: Rm global var helpers::CLIENT
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
3c06c45792
commit
fa63dbe5cf
6 changed files with 42 additions and 36 deletions
|
@ -4,6 +4,7 @@ use std::sync::Arc;
|
|||
pub use gh_crate_meta::*;
|
||||
pub use log::debug;
|
||||
pub use quickinstall::*;
|
||||
use reqwest::Client;
|
||||
|
||||
use crate::{AutoAbortJoinHandle, BinstallError, PkgFmt, PkgMeta};
|
||||
|
||||
|
@ -13,7 +14,7 @@ mod quickinstall;
|
|||
#[async_trait::async_trait]
|
||||
pub trait Fetcher: Send + Sync {
|
||||
/// Create a new fetcher from some data
|
||||
async fn new(data: &Data) -> Arc<Self>
|
||||
async fn new(client: &Client, data: &Data) -> Arc<Self>
|
||||
where
|
||||
Self: Sized;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue