Skip to content

Commit

Permalink
Use bail
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-koch committed Nov 27, 2024
1 parent 73e4585 commit 472288e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hugr-llvm/src/extension/collections.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{anyhow, Ok, Result};
use anyhow::{anyhow, bail, Ok, Result};
use hugr_core::core::Either;
use hugr_core::core::Either::{Left, Right};
use hugr_core::{
Expand Down Expand Up @@ -243,7 +243,7 @@ fn emit_list_op<'c, H: HugrView>(
let hugr_elem_ty = match args.node().args() {
[TypeArg::Type { ty }] => ty.clone(),
_ => {
return Err(anyhow!("Collections: invalid type args for list op"));
bail!("Collections: invalid type args for list op");
}
};
let elem_ty = ctx.llvm_type(&hugr_elem_ty)?;
Expand Down

0 comments on commit 472288e

Please sign in to comment.