N4ANQ2NUA7Y5NPIAVGPYYHI4QQA52YEA6J3LX455AR5FXOJLJ6SQC
#[cfg(test)]
mod test {
use super::*;
#[test]
fn anyhow() {
let error1 = anyhow!("This {}", "works");
let error2 = anyhow!("This works");
assert_eq!(error1.to_string(), error2.to_string());
}
#[test]
fn bail() {
let f = || -> Result<()> { bail!("This {}", "works") };
let error1 = f().err().unwrap();
let f = || -> Result<()> { bail!("This works") };
let error2 = f().err().unwrap();
assert_eq!(error1.to_string(), error2.to_string());
}
}