Skip to content

Commit

Permalink
Use a more traditional Debug impl for IntoStackFutureError
Browse files Browse the repository at this point in the history
  • Loading branch information
eholk committed Nov 16, 2022
1 parent 4c3b42a commit 0856ccb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,11 @@ impl<F> Display for IntoStackFutureError<F> {

impl<F> Debug for IntoStackFutureError<F> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
// Forward to the Display implementation
write!(f, "{self}")
f.debug_struct("IntoStackFutureError")
.field("maximum_size", &self.maximum_size)
.field("maximum_alignment", &self.maximum_alignment)
.field("future", &core::any::type_name::<F>())
.finish()
}
}

Expand Down

0 comments on commit 0856ccb

Please sign in to comment.