Add a proper implementation of Debug for JEP106Code.
//! ```
/// A Struct which contains a fully qualified JEP106 manufacturer code.
-#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+#[derive(Copy, Clone, PartialEq, Eq)]
pub struct JEP106Code {
/// JEP106 identification code.
/// Points to a manufacturer name in the bank table corresponding to `cc`.
@@ -53,4 +53,10 @@ impl JEP106Code {
}
}
+impl std::fmt::Debug for JEP106Code {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ write!(f, "JEP106Code({{ cc: 0x{:02x?}, id: 0x{:02x?} }} => {})", self.cc, self.id, self.get())
+ }
+}
+
include!(concat!(env!("OUT_DIR"), "/jep106.rs"));
\ No newline at end of file
