Skip to content

Commit 047e156

Browse files
committed
use Debug
with anyhow::Error it shows what you want
1 parent fa0a23a commit 047e156

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/formality-core/src/test_util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ pub trait ResultTestExt<T, E> {
5858
impl<T, E> ResultTestExt<T, E> for Result<T, E>
5959
where
6060
T: Debug,
61-
E: Display,
61+
E: Debug,
6262
{
6363
fn assert_ok(self, expect: expect_test::Expect) {
6464
match self {
6565
Ok(v) => {
6666
expect.assert_eq(&format!("{v:?}"));
6767
}
6868
Err(e) => {
69-
panic!("expected `Ok`, got `Err`: {e}");
69+
panic!("expected `Ok`, got `Err`: {e:?}");
7070
}
7171
}
7272
}
@@ -75,7 +75,7 @@ where
7575
match self {
7676
Ok(v) => panic!("expected `Err`, got `Ok`: {v:?}"),
7777
Err(e) => {
78-
expect.assert_eq(&format!("{e}"));
78+
expect.assert_eq(&format!("{e:?}"));
7979
}
8080
}
8181
}

0 commit comments

Comments
 (0)