mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 08:06:38 +00:00
Add new API GhApiClient::remote_client
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
1ad2d0ad87
commit
6b0f4602b9
1 changed files with 5 additions and 1 deletions
|
@ -131,6 +131,10 @@ impl GhApiClient {
|
|||
is_auth_token_valid: AtomicBool::new(true),
|
||||
}))
|
||||
}
|
||||
|
||||
pub fn remote_client(&self) -> &remote::Client {
|
||||
&self.0.client
|
||||
}
|
||||
}
|
||||
|
||||
impl GhApiClient {
|
||||
|
@ -560,7 +564,7 @@ mod test {
|
|||
let browser_download_task = client.get_auth_token().map(|_| {
|
||||
tokio::spawn(
|
||||
Download::new(
|
||||
client.0.client.clone(),
|
||||
client.remote_client().clone(),
|
||||
Url::parse(&format!(
|
||||
"https://github.com/{}/{}/releases/download/{}/{}",
|
||||
artifact.release.repo.owner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue