We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ffb268 commit baaa129Copy full SHA for baaa129
src/i2c.rs
@@ -42,6 +42,17 @@ impl I2cdev {
42
}
43
44
45
+impl fmt::Debug for I2cdev {
46
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
47
+ f.debug_struct("I2cdev")
48
+ .field("path", &self.path)
49
+ .field("address", &self.address)
50
+ // For the inner field we provide a placeholder, i2cdev does not impl Debug for LinuxI2CDevice
51
+ .field("inner", &format!("LinuxI2CDevice<path: {:?}>", self.path))
52
+ .finish()
53
+ }
54
+}
55
+
56
impl ops::Deref for I2cdev {
57
type Target = i2cdev::linux::LinuxI2CDevice;
58
0 commit comments