Bläddra i källkod

Tidy up Debug implementation of MethodCode

Isaac Woods 4 år sedan
förälder
incheckning
c7ba997bd1
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      aml/src/value.rs

+ 2 - 2
aml/src/value.rs

@@ -160,8 +160,8 @@ pub enum MethodCode {
 impl fmt::Debug for MethodCode {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
-            MethodCode::Aml(ref code) => f.debug_struct("AML method").field("code", code).finish(),
-            MethodCode::Native(_) => f.debug_struct("Native method").finish(),
+            MethodCode::Aml(ref code) => write!(f, "AML({:x?})", code),
+            MethodCode::Native(_) => write!(f, "(native method)"),
         }
     }
 }