mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Bump dep reqwest in binstalk-downloader from 0.11.26 to 0.12.0 (#1655)
* Bump dep reqwest in binstalk-downloader from 0.11.26 to 0.12.0 reqwest 0.11.27 is still used in gix, but it will be upgraded in next gix release. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix feature selection: Forward tls feature to `simple-git` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
8de3ec8fb7
commit
397fa7200f
5 changed files with 355 additions and 96 deletions
|
@ -1,9 +1,8 @@
|
|||
use std::{net::SocketAddr, sync::Arc};
|
||||
|
||||
use hickory_resolver::TokioAsyncResolver;
|
||||
use hyper::client::connect::dns::Name;
|
||||
use once_cell::sync::OnceCell;
|
||||
use reqwest::dns::{Addrs, Resolve};
|
||||
use reqwest::dns::{Addrs, Name, Resolve, Resolving};
|
||||
use tracing::{debug, instrument, warn};
|
||||
|
||||
#[cfg(windows)]
|
||||
|
@ -15,7 +14,7 @@ type BoxError = Box<dyn std::error::Error + Send + Sync>;
|
|||
pub struct TrustDnsResolver(Arc<OnceCell<TokioAsyncResolver>>);
|
||||
|
||||
impl Resolve for TrustDnsResolver {
|
||||
fn resolve(&self, name: Name) -> reqwest::dns::Resolving {
|
||||
fn resolve(&self, name: Name) -> Resolving {
|
||||
let resolver = self.clone();
|
||||
Box::pin(async move {
|
||||
let resolver = resolver.0.get_or_try_init(new_resolver)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue