mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +00:00
Refactor: Replace REQWESTCONFIG
with initialize_reqwest_client
so that we don't need two `OnceCell`s. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
50b436100e
commit
6582eefd25
3 changed files with 29 additions and 34 deletions
|
@ -200,13 +200,8 @@ async fn entry() -> Result<()> {
|
|||
bin_dir: opts.bin_dir.take(),
|
||||
};
|
||||
|
||||
// Initialize REQWESTGLOBALCONFIG
|
||||
REQWESTGLOBALCONFIG
|
||||
.set(ReqwestConfig {
|
||||
secure: opts.secure,
|
||||
min_tls: opts.min_tls_version.map(|v| v.into()),
|
||||
})
|
||||
.unwrap();
|
||||
// Initialize reqwest client
|
||||
initialize_reqwest_client(opts.secure, opts.min_tls_version.map(|v| v.into()))?;
|
||||
|
||||
// Setup logging
|
||||
let mut log_config = ConfigBuilder::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue