diff --git a/eyre/tests/test_location.rs b/eyre/tests/test_location.rs index 53c181f..e0033a6 100644 --- a/eyre/tests/test_location.rs +++ b/eyre/tests/test_location.rs @@ -1,7 +1,5 @@ use std::panic::Location; -use eyre::WrapErr; - struct LocationHandler { actual: Option<&'static str>, expected: &'static str, @@ -46,6 +44,7 @@ fn test_wrap_err() { Box::new(LocationHandler::new(expected_location)) })); + use eyre::WrapErr; let err = read_path("totally_fake_path") .wrap_err("oopsie") .unwrap_err(); @@ -75,6 +74,7 @@ fn test_wrap_err_with() { Box::new(LocationHandler::new(expected_location)) })); + use eyre::WrapErr; let err = read_path("totally_fake_path") .wrap_err_with(|| "oopsie") .unwrap_err(); @@ -83,7 +83,6 @@ fn test_wrap_err_with() { println!("{:?}", err); } -#[cfg(feature = "anyhow")] #[test] fn test_option_ok_or_eyre() { let _ = eyre::set_hook(Box::new(|_e| { @@ -106,6 +105,7 @@ fn test_context() { Box::new(LocationHandler::new(expected_location)) })); + use eyre::WrapErr; let err = read_path("totally_fake_path") .context("oopsie") .unwrap_err(); @@ -122,6 +122,7 @@ fn test_with_context() { Box::new(LocationHandler::new(expected_location)) })); + use eyre::WrapErr; let err = read_path("totally_fake_path") .with_context(|| "oopsie") .unwrap_err();