From 43b91924b06a09096baca05a6b0da6bb33103b2c Mon Sep 17 00:00:00 2001 From: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com> Date: Fri, 28 Jun 2024 13:50:13 +0200 Subject: [PATCH] chore: remove obsolete `impl ContextCompat for Option` location tests Fixes https://github.com/eyre-rs/eyre/pull/150#discussion_r1658544995, https://github.com/eyre-rs/eyre/pull/150#discussion_r1658545850 --- eyre/tests/test_location.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/eyre/tests/test_location.rs b/eyre/tests/test_location.rs index 21f4716..ad1941c 100644 --- a/eyre/tests/test_location.rs +++ b/eyre/tests/test_location.rs @@ -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() {