diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-10-06 22:56:31 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-10-06 23:19:53 +0200 |
| commit | 8730a013c395cf0bf4c2fa8eeb7f138288103039 (patch) | |
| tree | 39eca5fbc4570bd0129c9a291f134de5dab98820 /embassy-usb/src/builder.rs | |
| parent | abc8e450f936567ad42cb34b5d2a7941b206aa5d (diff) | |
Rustfmt for edition 2024.
Diffstat (limited to 'embassy-usb/src/builder.rs')
| -rw-r--r-- | embassy-usb/src/builder.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index 8d7abe46c..6fc2a5a22 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs | |||
| @@ -5,7 +5,7 @@ use crate::descriptor::{BosWriter, DescriptorWriter, SynchronizationType, UsageT | |||
| 5 | use crate::driver::{Driver, Endpoint, EndpointAddress, EndpointInfo, EndpointType}; | 5 | use crate::driver::{Driver, Endpoint, EndpointAddress, EndpointInfo, EndpointType}; |
| 6 | use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter}; | 6 | use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter}; |
| 7 | use crate::types::{InterfaceNumber, StringIndex}; | 7 | use crate::types::{InterfaceNumber, StringIndex}; |
| 8 | use crate::{Handler, Interface, UsbDevice, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START}; | 8 | use crate::{Handler, Interface, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START, UsbDevice}; |
| 9 | 9 | ||
| 10 | #[derive(Debug, Copy, Clone)] | 10 | #[derive(Debug, Copy, Clone)] |
| 11 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 11 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| @@ -176,7 +176,9 @@ impl<'d, D: Driver<'d>> Builder<'d, D> { | |||
| 176 | if config.composite_with_iads | 176 | if config.composite_with_iads |
| 177 | && (config.device_class != 0xEF || config.device_sub_class != 0x02 || config.device_protocol != 0x01) | 177 | && (config.device_class != 0xEF || config.device_sub_class != 0x02 || config.device_protocol != 0x01) |
| 178 | { | 178 | { |
| 179 | panic!("if composite_with_iads is set, you must set device_class = 0xEF, device_sub_class = 0x02, device_protocol = 0x01"); | 179 | panic!( |
| 180 | "if composite_with_iads is set, you must set device_class = 0xEF, device_sub_class = 0x02, device_protocol = 0x01" | ||
| 181 | ); | ||
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | assert!( | 184 | assert!( |
| @@ -337,7 +339,8 @@ impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D> { | |||
| 337 | num_alt_settings: 0, | 339 | num_alt_settings: 0, |
| 338 | }; | 340 | }; |
| 339 | 341 | ||
| 340 | assert!(self.builder.interfaces.push(iface).is_ok(), | 342 | assert!( |
| 343 | self.builder.interfaces.push(iface).is_ok(), | ||
| 341 | "embassy-usb: interface list full. Increase the `max_interface_count` compile-time setting. Current value: {}", | 344 | "embassy-usb: interface list full. Increase the `max_interface_count` compile-time setting. Current value: {}", |
| 342 | MAX_INTERFACE_COUNT | 345 | MAX_INTERFACE_COUNT |
| 343 | ); | 346 | ); |
