mirror of
https://github.com/G2-Games/cross-usb.git
synced 2025-04-19 05:12:53 -05:00
Ran cargo fmt
This commit is contained in:
parent
202d2d1fbd
commit
092cb0583a
1 changed files with 13 additions and 5 deletions
|
@ -9,7 +9,9 @@ use web_sys::{
|
|||
};
|
||||
|
||||
// Crate stuff
|
||||
use crate::usb::{ControlIn, ControlOut, ControlType, Device, Interface, Recipient, UsbError, Descriptor};
|
||||
use crate::usb::{
|
||||
ControlIn, ControlOut, ControlType, Descriptor, Device, Interface, Recipient, UsbError,
|
||||
};
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct UsbDescriptor {
|
||||
|
@ -273,7 +275,7 @@ impl Descriptor for UsbDescriptor {
|
|||
|
||||
async fn open(self) -> Result<Self::Device, UsbError> {
|
||||
Ok(Self::Device {
|
||||
device: self.device
|
||||
device: self.device,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -313,7 +315,9 @@ impl Device for UsbDevice {
|
|||
let _device: WasmUsbDevice = match dev_promise {
|
||||
Ok(dev) => dev.into(),
|
||||
Err(err) => {
|
||||
return Err(UsbError::CommunicationError(err.as_string().unwrap_or_default()));
|
||||
return Err(UsbError::CommunicationError(
|
||||
err.as_string().unwrap_or_default(),
|
||||
));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -332,7 +336,9 @@ impl Device for UsbDevice {
|
|||
|
||||
match result {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => Err(UsbError::CommunicationError(err.as_string().unwrap_or_default())),
|
||||
Err(err) => Err(UsbError::CommunicationError(
|
||||
err.as_string().unwrap_or_default(),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,7 +347,9 @@ impl Device for UsbDevice {
|
|||
|
||||
match result {
|
||||
Ok(_) => Ok(()),
|
||||
Err(err) => Err(UsbError::CommunicationError(err.as_string().unwrap_or_default())),
|
||||
Err(err) => Err(UsbError::CommunicationError(
|
||||
err.as_string().unwrap_or_default(),
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue