Skip to content

Commit

Permalink
Auto merge of #1841 - RalfJung:debug, r=RalfJung
Browse files Browse the repository at this point in the history
use exhaustive struct match for manual Debug impl
  • Loading branch information
bors committed Jun 20, 2021
2 parents 23f05fc + 7b2d2cf commit 4933e28
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down

0 comments on commit 4933e28

Please sign in to comment.