diff options
Diffstat (limited to 'tests/typeset.rs')
| -rw-r--r-- | tests/typeset.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index dfc8bff9..5e9b79fe 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -18,7 +18,7 @@ use typst::loading::FsLoader; use typst::parse::Scanner; use typst::source::SourceFile; use typst::syntax::Span; -use typst::Context; +use typst::{bail, Context}; const TYP_DIR: &str = "./typ"; const REF_DIR: &str = "./ref"; @@ -77,10 +77,7 @@ fn main() { let lhs = args.expect::<Value>("left-hand side")?; let rhs = args.expect::<Value>("right-hand side")?; if lhs != rhs { - return Err(Error::boxed( - args.span, - format!("Assertion failed: {:?} != {:?}", lhs, rhs), - )); + bail!(args.span, "Assertion failed: {:?} != {:?}", lhs, rhs,); } Ok(Value::None) }); |
