diff options
| author | René van Dorst <[email protected]> | 2025-02-03 22:08:23 +0100 |
|---|---|---|
| committer | René van Dorst <[email protected]> | 2025-02-03 22:08:23 +0100 |
| commit | d363401ba519e23a189f05287ecafd95f2feba16 (patch) | |
| tree | 575eaa29b421f5b9cf745a5dcbe210e829592335 /embassy-usb/src/class | |
| parent | 113383b8b1c08d9240af80bf2f1c5811d46bf1a2 (diff) | |
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;
| ^^^^^^^^^^^^^^^^^^^
Diffstat (limited to 'embassy-usb/src/class')
| -rw-r--r-- | embassy-usb/src/class/cdc_ncm/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/embassy-usb/src/class/cdc_ncm/mod.rs b/embassy-usb/src/class/cdc_ncm/mod.rs index bea9dac27..09d923d2a 100644 --- a/embassy-usb/src/class/cdc_ncm/mod.rs +++ b/embassy-usb/src/class/cdc_ncm/mod.rs | |||
| @@ -14,9 +14,8 @@ | |||
| 14 | //! 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> | 14 | //! 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> |
| 15 | //! and this nonsense in the linux kernel: <https://github.com/torvalds/linux/blob/c00c5e1d157bec0ef0b0b59aa5482eb8dc7e8e49/drivers/net/usb/usbnet.c#L1751-L1757> | 15 | //! and this nonsense in the linux kernel: <https://github.com/torvalds/linux/blob/c00c5e1d157bec0ef0b0b59aa5482eb8dc7e8e49/drivers/net/usb/usbnet.c#L1751-L1757> |
| 16 | 16 | ||
| 17 | use core::intrinsics::copy_nonoverlapping; | ||
| 18 | use core::mem::{size_of, MaybeUninit}; | 17 | use core::mem::{size_of, MaybeUninit}; |
| 19 | use core::ptr::addr_of; | 18 | use core::ptr::{addr_of, copy_nonoverlapping}; |
| 20 | 19 | ||
| 21 | use crate::control::{self, InResponse, OutResponse, Recipient, Request, RequestType}; | 20 | use crate::control::{self, InResponse, OutResponse, Recipient, Request, RequestType}; |
| 22 | use crate::driver::{Driver, Endpoint, EndpointError, EndpointIn, EndpointOut}; | 21 | use crate::driver::{Driver, Endpoint, EndpointError, EndpointIn, EndpointOut}; |
