build: vendor Rust crate dependencies
This commit is contained in:
14
third_party/crates/anyhow-1.0.104/tests/common/mod.rs
vendored
Normal file
14
third_party/crates/anyhow-1.0.104/tests/common/mod.rs
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
use anyhow::{bail, Result};
|
||||
use std::io;
|
||||
|
||||
pub fn bail_literal() -> Result<()> {
|
||||
bail!("oh no!");
|
||||
}
|
||||
|
||||
pub fn bail_fmt() -> Result<()> {
|
||||
bail!("{} {}!", "oh", "no");
|
||||
}
|
||||
|
||||
pub fn bail_error() -> Result<()> {
|
||||
bail!(io::Error::new(io::ErrorKind::Other, "oh no!"));
|
||||
}
|
||||
Reference in New Issue
Block a user