mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 16:16:37 +00:00
Refactor: Make sure 'static
Future is returned
To make it easier to create generic function Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c36145f2b4
commit
cb418fda11
3 changed files with 51 additions and 32 deletions
|
@ -76,12 +76,14 @@ fn fetch_release_artifacts_restful_api(
|
|||
) -> impl Future<Output = Result<Artifacts, GhApiError>> + Send + Sync + 'static {
|
||||
issue_restful_api(
|
||||
client,
|
||||
format!(
|
||||
"repos/{owner}/{repo}/releases/tags/{tag}",
|
||||
owner = percent_encode_http_url_path(owner),
|
||||
repo = percent_encode_http_url_path(repo),
|
||||
tag = percent_encode_http_url_path(tag),
|
||||
),
|
||||
&[
|
||||
"repos",
|
||||
&percent_encode_http_url_path(owner).to_compact_string(),
|
||||
&percent_encode_http_url_path(repo).to_compact_string(),
|
||||
"releases",
|
||||
"tags",
|
||||
&percent_encode_http_url_path(tag).to_compact_string(),
|
||||
],
|
||||
auth_token,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue