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:
Jiahao XU 2024-04-03 07:26:39 +10:00 committed by GitHub
parent 8de3ec8fb7
commit 397fa7200f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 355 additions and 96 deletions

View file

@ -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)?;