mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-27 13:01:29 +00:00

This change hides the `anyhow` compatibility layer behind an `"anyhow"` feature flag. In `eyre` v1.0.0 the feature is currently enabled by default. Fixes #131 --------- Co-authored-by: Freja Roberts <ten3roberts@gmail.com>
16 lines
255 B
Rust
16 lines
255 B
Rust
#![cfg(feature = "anyhow")]
|
|
|
|
mod common;
|
|
|
|
use crate::common::maybe_install_handler;
|
|
|
|
#[test]
|
|
fn test_context() {
|
|
use eyre::{eyre, Report};
|
|
|
|
maybe_install_handler().unwrap();
|
|
|
|
let error: Report = eyre!("oh no!");
|
|
let _ = error.context();
|
|
}
|