Skip to content
Myr

mod.rs

This file

Path

tests/common/mod.rs

14 lines · 271 bytes · Rust

Last changed by

Not known.

History of this file

Take it

1use anyhow::{bail, Result};2use std::io;34pub fn bail_literal() -> Result<()> {5    bail!("oh no!");6}78pub fn bail_fmt() -> Result<()> {9    bail!("{} {}!", "oh", "no");10}1112pub fn bail_error() -> Result<()> {13    bail!(io::Error::new(io::ErrorKind::Other, "oh no!"));14}