fix: reduce to minimum patch, fix clippy

This commit is contained in:
Matthew Esposito 2024-10-31 16:09:35 -04:00
parent efdf1848ac
commit 9aea9c90a2
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ async fn stream(url: &str, req: &Request<Body>) -> Result<Response<Body>, String
// Build the hyper client from the HTTPS connector. // Build the hyper client from the HTTPS connector.
let client: Client<_, Body> = { let client: Client<_, Body> = {
let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build(); let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build();
client::Client::builder().pool_max_idle_per_host(0).build(https) client::Client::builder().build(https)
}; };
let mut builder = Request::get(parsed_uri); let mut builder = Request::get(parsed_uri);
@ -221,7 +221,7 @@ fn request(method: &'static Method, path: String, redirect: bool, quarantine: bo
// Construct the hyper client from the HTTPS connector. // Construct the hyper client from the HTTPS connector.
let client: Client<_, Body> = { let client: Client<_, Body> = {
let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build(); let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build();
client::Client::builder().pool_max_idle_per_host(0).build(https) client::Client::builder().build(https)
}; };
let (token, vendor_id, device_id, user_agent, loid) = { let (token, vendor_id, device_id, user_agent, loid) = {

View File

@ -1,7 +1,7 @@
use std::{collections::HashMap, sync::atomic::Ordering, time::Duration}; use std::{collections::HashMap, sync::atomic::Ordering, time::Duration};
use crate::{ use crate::{
client::{CLIENT, OAUTH_CLIENT, OAUTH_IS_ROLLING_OVER, OAUTH_RATELIMIT_REMAINING}, client::{OAUTH_CLIENT, OAUTH_IS_ROLLING_OVER, OAUTH_RATELIMIT_REMAINING},
oauth_resources::ANDROID_APP_VERSION_LIST, oauth_resources::ANDROID_APP_VERSION_LIST,
}; };
use base64::{engine::general_purpose, Engine as _}; use base64::{engine::general_purpose, Engine as _};
@ -96,7 +96,7 @@ impl Oauth {
// Send request // Send request
let client: client::Client<_, Body> = { let client: client::Client<_, Body> = {
let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build(); let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build();
client::Client::builder().pool_max_idle_per_host(0).build(https) client::Client::builder().build(https)
}; };
let resp = client.request(request).await.ok()?; let resp = client.request(request).await.ok()?;