eyre/tests/test_context.rs
2019-10-11 18:23:56 -07:00

11 lines
219 B
Rust

use anyhow::{Context, Result};
// https://github.com/dtolnay/anyhow/issues/18
#[test]
fn test_inference() -> Result<()> {
let x = "1";
let y: u32 = x.parse().context("...")?;
assert_eq!(y, 1);
Ok(())
}