Skip to content

Commit

Permalink
fix: import consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Jun 28, 2024
1 parent 231090d commit 0eabf81
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions eyre/tests/test_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,12 @@ fn test_option_ok_or_eyre() {
#[cfg(feature = "anyhow")]
#[test]
fn test_context() {
use eyre::ContextCompat;

let _ = eyre::set_hook(Box::new(|_e| {
let expected_location = file!();
Box::new(LocationHandler::new(expected_location))
}));

use eyre::ContextCompat;
let err = read_path("totally_fake_path")
.context("oopsie")
.unwrap_err();
Expand All @@ -118,13 +117,12 @@ fn test_context() {
#[cfg(feature = "anyhow")]
#[test]
fn test_with_context() {
use eyre::ContextCompat;

let _ = eyre::set_hook(Box::new(|_e| {
let expected_location = file!();
Box::new(LocationHandler::new(expected_location))
}));

use eyre::ContextCompat;
let err = read_path("totally_fake_path")
.with_context(|| "oopsie")
.unwrap_err();
Expand Down

0 comments on commit 0eabf81

Please sign in to comment.