From 7b2d2cfa462fac0824faf9060848d4b423f70b19 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 20 Jun 2021 19:33:05 +0200 Subject: [PATCH] use exhaustive struct match for manual Debug impl --- src/machine.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/machine.rs b/src/machine.rs index 91a83a8acf40..7ec510d0506f 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -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() } }