Skip to content

Commit ce7a0f6

Browse files
committed
Derive Debug
1 parent dc1eb9f commit ce7a0f6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/err/mod.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl<'py> DowncastIntoError<'py> {
111111
}
112112

113113
// Helper to store either a concrete type or a type name
114+
#[derive(Debug)]
114115
enum TypeNameOrValue<'py> {
115116
Name(Cow<'static, str>),
116117
Value(Bound<'py, PyType>),
@@ -845,12 +846,6 @@ fn display_downcast_error(
845846
)
846847
}
847848

848-
impl std::fmt::Debug for TypeNameOrValue<'_> {
849-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
850-
std::fmt::Display::fmt(self, f)
851-
}
852-
}
853-
854849
impl std::fmt::Display for TypeNameOrValue<'_> {
855850
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
856851
match self {

0 commit comments

Comments
 (0)