From 3cee8a927b3a7bbea7583559ae9c61336aa5f657 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Tue, 4 Jun 2024 23:53:08 +1000 Subject: [PATCH] Rename `ReleaseArtifactUrl` to `GhReleaseArtifactUrl` Signed-off-by: Jiahao XU --- crates/binstalk-git-repo-api/src/gh_api_client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/binstalk-git-repo-api/src/gh_api_client.rs b/crates/binstalk-git-repo-api/src/gh_api_client.rs index 71d59b00..b44ba810 100644 --- a/crates/binstalk-git-repo-api/src/gh_api_client.rs +++ b/crates/binstalk-git-repo-api/src/gh_api_client.rs @@ -229,7 +229,7 @@ impl GhApiClient { } #[derive(Clone, Debug, Eq, PartialEq, Hash)] -pub struct ReleaseArtifactUrl(Url); +pub struct GhReleaseArtifactUrl(Url); impl GhApiClient { /// Return `Ok(Some(api_artifact_url))` if exists. @@ -241,7 +241,7 @@ impl GhApiClient { release, artifact_name, }: GhReleaseArtifact, - ) -> Result, GhApiError> { + ) -> Result, GhApiError> { let once_cell = self.0.release_artifacts.get(release.clone()); let res = once_cell .get_or_try_init(|| { @@ -265,7 +265,7 @@ impl GhApiClient { match res { Ok(Some(artifacts)) => Ok(artifacts .get_artifact_url(&artifact_name) - .map(ReleaseArtifactUrl)), + .map(GhReleaseArtifactUrl)), Ok(None) => Ok(None), Err(GhApiError::RateLimit { retry_after }) => { *self.0.retry_after.lock().unwrap() = @@ -279,7 +279,7 @@ impl GhApiClient { pub async fn download_artifact( &self, - artifact_url: ReleaseArtifactUrl, + artifact_url: GhReleaseArtifactUrl, ) -> Result, GhApiError> { self.check_retry_after()?;