From 71a63b25658e9f5d7bbdf5a3ab0ea6b6488161d2 Mon Sep 17 00:00:00 2001 From: Cyborus Date: Sat, 16 Dec 2023 22:48:07 -0500 Subject: [PATCH] format --- src/release.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/release.rs b/src/release.rs index f2ed7f2..bbd1225 100644 --- a/src/release.rs +++ b/src/release.rs @@ -140,7 +140,7 @@ impl ReleaseCommand { name, } => create_asset(&repo, &api, release, path, name).await?, AssetCommand::Delete { release, asset } => { - delete_asset(&repo, &api, release, asset ).await? + delete_asset(&repo, &api, release, asset).await? } AssetCommand::Download { release, @@ -399,15 +399,22 @@ async fn download_asset( ) -> eyre::Result<()> { let release = find_release(repo, api, &release).await?; let file = match &*asset { - "source.zip" => api.download_release_zip(repo.owner(), repo.name(), release.id).await?, - "source.tar.gz" => api.download_release_tarball(repo.owner(), repo.name(), release.id).await?, + "source.zip" => { + api.download_release_zip(repo.owner(), repo.name(), release.id) + .await? + } + "source.tar.gz" => { + api.download_release_tarball(repo.owner(), repo.name(), release.id) + .await? + } name => { let asset = release .assets .iter() .find(|a| a.name == name) .ok_or_else(|| eyre!("asset not found"))?; - api.download_release_attachment(repo.owner(), repo.name(), release.id, asset.id).await? + api.download_release_attachment(repo.owner(), repo.name(), release.id, asset.id) + .await? } }; let file = file.ok_or_else(|| eyre!("asset not found"))?;