mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +00:00
Improve use of github token (#1769)
* Add new dep zeroize * Use Zeroizing to avoid leaking the token * Optimize gh-auth-token Spawn it as a task, and only await it when using GhApiClient * Fix binstalk-git-repo-api unit tests
This commit is contained in:
parent
e3c8c40806
commit
fff6aa8122
13 changed files with 128 additions and 54 deletions
|
@ -106,6 +106,8 @@ async fn resolve_inner(
|
|||
},
|
||||
);
|
||||
|
||||
let gh_api_client = opts.gh_api_client.get().await?;
|
||||
|
||||
let mut handles_fn =
|
||||
|data: Arc<Data>, filter_fetcher_by_name_predicate: fn(&'static str) -> bool| {
|
||||
handles.extend(
|
||||
|
@ -132,7 +134,7 @@ async fn resolve_inner(
|
|||
.filter_map(|(f, target_data)| {
|
||||
let fetcher = f(
|
||||
opts.client.clone(),
|
||||
opts.gh_api_client.clone(),
|
||||
gh_api_client.clone(),
|
||||
data.clone(),
|
||||
target_data,
|
||||
opts.signature_policy,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue