use exhaustive struct match for manual Debug impl
This commit is contained in:
parent
5b7f1f919b
commit
7b2d2cfa46
@ -52,9 +52,10 @@ pub struct FrameData<'tcx> {
|
|||||||
impl<'tcx> std::fmt::Debug for FrameData<'tcx> {
|
impl<'tcx> std::fmt::Debug for FrameData<'tcx> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
// Omitting `timing`, it does not support `Debug`.
|
// Omitting `timing`, it does not support `Debug`.
|
||||||
|
let FrameData { call_id, catch_unwind, timing: _ } = self;
|
||||||
f.debug_struct("FrameData")
|
f.debug_struct("FrameData")
|
||||||
.field("call_id", &self.call_id)
|
.field("call_id", call_id)
|
||||||
.field("catch_unwind", &self.catch_unwind)
|
.field("catch_unwind", catch_unwind)
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user