Skip to content

Commit

Permalink
chore: remove obsolete impl ContextCompat for Option location tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoniePhiline committed Jun 28, 2024
1 parent f9f3a35 commit 43b9192
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions eyre/tests/test_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,36 +131,6 @@ fn test_with_context() {
println!("{:?}", err);
}

#[cfg(feature = "anyhow")]
#[test]
fn test_option_compat_wrap_err() {
let _ = eyre::set_hook(Box::new(|_e| {
let expected_location = file!();
Box::new(LocationHandler::new(expected_location))
}));

use eyre::ContextCompat;
let err = None::<()>.context("oopsie").unwrap_err();

// should panic if the location isn't in our crate
println!("{:?}", err);
}

#[cfg(feature = "anyhow")]
#[test]
fn test_option_compat_wrap_err_with() {
let _ = eyre::set_hook(Box::new(|_e| {
let expected_location = file!();
Box::new(LocationHandler::new(expected_location))
}));

use eyre::ContextCompat;
let err = None::<()>.with_context(|| "oopsie").unwrap_err();

// should panic if the location isn't in our crate
println!("{:?}", err);
}

#[cfg(feature = "anyhow")]
#[test]
fn test_option_compat_context() {
Expand Down

0 comments on commit 43b9192

Please sign in to comment.