Skip to content

Commit

Permalink
refactor(uploader): use shorthand bail
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Jan 17, 2024
1 parent 358b9fc commit 4b052ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uploader/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ async fn retrieve_upload_data(
match response {
Ok(response) => {
if response.status().is_client_error() {
return Err(anyhow!(
bail!(
"Failed to retrieve upload data: {} {}",
response.status(),
response.text().await?
));
);
}

Ok(response.json().await?)
Expand Down

0 comments on commit 4b052ed

Please sign in to comment.