mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-14 14:46:37 +00:00
Optimize: Only call LazyJobserverClient::new
when necessary
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
040068864c
commit
9c20b3c0ec
1 changed files with 2 additions and 3 deletions
|
@ -12,9 +12,6 @@ use crate::{
|
|||
};
|
||||
|
||||
pub fn do_main() -> impl Termination {
|
||||
// This must be the very first thing to happen
|
||||
let jobserver_client = LazyJobserverClient::new();
|
||||
|
||||
let (args, cli_overrides) = args::parse();
|
||||
|
||||
if args.version {
|
||||
|
@ -54,6 +51,8 @@ rustc-llvm-version: {rustc_llvm_version}"#
|
|||
|
||||
let start = Instant::now();
|
||||
|
||||
let jobserver_client = LazyJobserverClient::new();
|
||||
|
||||
let result =
|
||||
run_tokio_main(|| entry::install_crates(args, cli_overrides, jobserver_client));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue