use exhaustive struct match for manual Debug impl

This commit is contained in:
Ralf Jung 2021-06-20 19:33:05 +02:00
parent 5b7f1f919b
commit 7b2d2cfa46

View File

@ -52,9 +52,10 @@ pub struct FrameData<'tcx> {
impl<'tcx> std::fmt::Debug for FrameData<'tcx> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
// Omitting `timing`, it does not support `Debug`.
let FrameData { call_id, catch_unwind, timing: _ } = self;
f.debug_struct("FrameData")
.field("call_id", &self.call_id)
.field("catch_unwind", &self.catch_unwind)
.field("call_id", call_id)
.field("catch_unwind", catch_unwind)
.finish()
}
}