diff options
| author | 9names <[email protected]> | 2024-12-28 23:41:36 +1100 |
|---|---|---|
| committer | 9names <[email protected]> | 2024-12-28 23:48:14 +1100 |
| commit | adf3134e7d722d4c400e09715b3a49a7ffd45edb (patch) | |
| tree | 5e82973aa6570616f831dac312a3056c0a0c01db /embassy-usb/src/types.rs | |
| parent | b71696c8f54edba664e9bfe77a1d86d09d88f52c (diff) | |
embassy-usb: fix building with optional log feature
Diffstat (limited to 'embassy-usb/src/types.rs')
| -rw-r--r-- | embassy-usb/src/types.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-usb/src/types.rs b/embassy-usb/src/types.rs index cb9fe2576..ea6347c7d 100644 --- a/embassy-usb/src/types.rs +++ b/embassy-usb/src/types.rs | |||
| @@ -18,6 +18,12 @@ impl From<InterfaceNumber> for u8 { | |||
| 18 | } | 18 | } |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | impl core::fmt::Display for InterfaceNumber { | ||
| 22 | fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { | ||
| 23 | write!(f, "{}", self.0) | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 21 | /// A handle for a USB string descriptor that contains its index. | 27 | /// A handle for a USB string descriptor that contains its index. |
| 22 | #[derive(Copy, Clone, Eq, PartialEq)] | 28 | #[derive(Copy, Clone, Eq, PartialEq)] |
| 23 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 29 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
