Skip to content

Commit d363401

Browse files
committed
embassy-usb: fix core::intrinsics deprecate warning in nightly.
Replaced `core::intrinsics::copy_nonoverlapping` with the `core::ptr::copy_nonoverlapping`. Compiling embassy-usb v0.4.0 (embassy/embassy-usb) warning: use of deprecated module `core::intrinsics`: import this function via `std::mem` instead --> embassy/embassy-usb/src/class/cdc_ncm/mod.rs:17:23 | 17 | use core::intrinsics::copy_nonoverlapping; | ^^^^^^^^^^^^^^^^^^^
1 parent 113383b commit d363401

File tree

1 file changed

+1
-2
lines changed
  • embassy-usb/src/class/cdc_ncm

1 file changed

+1
-2
lines changed

embassy-usb/src/class/cdc_ncm/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
//! This is due to regex spaghetti: <https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-mainline-12.0.0_r84/core/res/res/values/config.xml#417>
1515
//! and this nonsense in the linux kernel: <https://github.com/torvalds/linux/blob/c00c5e1d157bec0ef0b0b59aa5482eb8dc7e8e49/drivers/net/usb/usbnet.c#L1751-L1757>
1616
17-
use core::intrinsics::copy_nonoverlapping;
1817
use core::mem::{size_of, MaybeUninit};
19-
use core::ptr::addr_of;
18+
use core::ptr::{addr_of, copy_nonoverlapping};
2019

2120
use crate::control::{self, InResponse, OutResponse, Recipient, Request, RequestType};
2221
use crate::driver::{Driver, Endpoint, EndpointError, EndpointIn, EndpointOut};

0 commit comments

Comments
 (0)