Skip to content

Commit

Permalink
Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ferris committed Nov 7, 2024
1 parent 3b2c555 commit 3b540cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion embassy-usb-driver/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl SetupPacket {
/// Get a reference to the underlying bytes of the setup packet.
pub fn as_bytes(&self) -> &[u8] {
// Safe because we know that the size of SetupPacket is 8 bytes.
unsafe { core::slice::from_raw_parts(self as *const _ as *const u8, size_of::<Self>()) }
unsafe { core::slice::from_raw_parts(self as *const _ as *const u8, core::mem::size_of::<Self>()) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion embassy-usb/src/handlers/hub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ struct HubDescriptor {
}

impl USBDescriptor for HubDescriptor {
const SIZE: usize = size_of::<Self>();
const SIZE: usize = core::mem::size_of::<Self>();

const DESC_TYPE: u8 = 0x29;

Expand Down

0 comments on commit 3b540cf

Please sign in to comment.