Skip to content

Commit

Permalink
[naga xtask] Use anyhow::ensure! where appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Dec 27, 2023
1 parent 3e252ac commit 71f18fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions naga/xtask/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ pub(crate) fn validate(cmd: ValidateSubcommand) -> anyhow::Result<()> {

progress_bar.finish_and_clear();

if !all_good {
bail!("failed to validate one or more files, see above output for more details")
}
anyhow::ensure!(
all_good,
"failed to validate one or more files, see above output for more details"
);

if let Err(error) = enqueuing_thread.join().unwrap() {
bail!("Error enqueuing jobs:\n{:#}", error);
Expand Down

0 comments on commit 71f18fd

Please sign in to comment.