mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-29 14:05:28 +00:00
11 lines
219 B
Rust
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(())
|
|
}
|