From fc4eaa1ebf560915709cec20e79f4c9a8733ce4e Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Fri, 1 Nov 2024 03:31:56 -0700 Subject: [PATCH] Make our nightly CI checks pass (#2356) * Fix nightly lint errors for ESP32-C2 * Fix nightly lint errors for ESP32-C3 * Fix nightly lint errors for ESP32-C6 * Fix remaining nightly lint errors --- esp-hal/src/aes/esp32cX.rs | 2 +- esp-hal/src/aes/mod.rs | 6 +-- esp-hal/src/analog/adc/riscv.rs | 4 +- esp-hal/src/assist_debug.rs | 8 +-- esp-hal/src/dma/m2m.rs | 2 +- esp-hal/src/dma/mod.rs | 36 ++++++------- esp-hal/src/ecc.rs | 6 +-- esp-hal/src/etm.rs | 2 +- esp-hal/src/gpio/etm.rs | 27 +++++----- esp-hal/src/gpio/mod.rs | 73 +++++++++++++------------- esp-hal/src/i2c.rs | 8 +-- esp-hal/src/i2s.rs | 22 ++++---- esp-hal/src/ledc/channel.rs | 6 +-- esp-hal/src/ledc/timer.rs | 2 +- esp-hal/src/mcpwm/operator.rs | 12 ++--- esp-hal/src/parl_io.rs | 44 ++++++++-------- esp-hal/src/pcnt/channel.rs | 2 +- esp-hal/src/pcnt/mod.rs | 4 +- esp-hal/src/pcnt/unit.rs | 8 +-- esp-hal/src/peripheral.rs | 4 +- esp-hal/src/rmt.rs | 12 ++--- esp-hal/src/rng.rs | 3 +- esp-hal/src/rsa/esp32cX.rs | 8 +-- esp-hal/src/rsa/mod.rs | 12 ++--- esp-hal/src/rtc_cntl/mod.rs | 4 +- esp-hal/src/rtc_cntl/sleep/esp32c2.rs | 2 +- esp-hal/src/rtc_cntl/sleep/esp32c3.rs | 2 +- esp-hal/src/sha.rs | 4 +- esp-hal/src/spi/master.rs | 36 ++++++------- esp-hal/src/spi/slave.rs | 4 +- esp-hal/src/sync.rs | 2 +- esp-hal/src/timer/mod.rs | 20 +++---- esp-hal/src/timer/systimer.rs | 42 +++++++-------- esp-hal/src/timer/timg.rs | 4 +- esp-hal/src/twai/mod.rs | 4 +- esp-hal/src/usb_serial_jtag.rs | 16 +++--- esp-ieee802154/src/lib.rs | 2 +- esp-println/Cargo.toml | 3 ++ esp-wifi/src/ble/btdm.rs | 1 + esp-wifi/src/ble/controller/mod.rs | 2 +- esp-wifi/src/ble/npl.rs | 1 + esp-wifi/src/wifi/mod.rs | 2 +- examples/src/bin/ram.rs | 1 + examples/src/bin/wifi_coex.rs | 1 + examples/src/bin/wifi_embassy_bench.rs | 1 + 45 files changed, 233 insertions(+), 234 deletions(-) diff --git a/esp-hal/src/aes/esp32cX.rs b/esp-hal/src/aes/esp32cX.rs index bd653da4a..b20923cc9 100644 --- a/esp-hal/src/aes/esp32cX.rs +++ b/esp-hal/src/aes/esp32cX.rs @@ -3,7 +3,7 @@ use crate::{ system::{Peripheral as PeripheralEnable, PeripheralClockControl}, }; -impl<'d> Aes<'d> { +impl Aes<'_> { pub(super) fn init(&mut self) { PeripheralClockControl::enable(PeripheralEnable::Aes); self.write_dma(false); diff --git a/esp-hal/src/aes/mod.rs b/esp-hal/src/aes/mod.rs index bbf187525..f8c4f970c 100644 --- a/esp-hal/src/aes/mod.rs +++ b/esp-hal/src/aes/mod.rs @@ -301,13 +301,13 @@ pub mod dma { } } - impl<'d> core::fmt::Debug for AesDma<'d> { + impl core::fmt::Debug for AesDma<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { f.debug_struct("AesDma").finish() } } - impl<'d> DmaSupport for AesDma<'d> { + impl DmaSupport for AesDma<'_> { fn peripheral_wait_dma(&mut self, _is_rx: bool, _is_tx: bool) { while self.aes.aes.state().read().state().bits() != 2 // DMA status DONE == 2 && !self.channel.tx.is_done() @@ -347,7 +347,7 @@ pub mod dma { } } - impl<'d> AesDma<'d> { + impl AesDma<'_> { /// Writes the encryption key to the AES hardware, checking that its /// length matches expected constraints. pub fn write_key(&mut self, key: K) diff --git a/esp-hal/src/analog/adc/riscv.rs b/esp-hal/src/analog/adc/riscv.rs index b25eaa2fc..6b5413160 100644 --- a/esp-hal/src/analog/adc/riscv.rs +++ b/esp-hal/src/analog/adc/riscv.rs @@ -530,8 +530,8 @@ impl super::AdcCalEfuse for crate::peripherals::ADC2 { } } -impl<'d, ADCI, PIN, CS> embedded_hal_02::adc::OneShot> - for Adc<'d, ADCI> +impl embedded_hal_02::adc::OneShot> + for Adc<'_, ADCI> where PIN: embedded_hal_02::adc::Channel + super::AdcChannel, ADCI: RegisterAccess, diff --git a/esp-hal/src/assist_debug.rs b/esp-hal/src/assist_debug.rs index 4e5fe1e8c..1426ff2fa 100644 --- a/esp-hal/src/assist_debug.rs +++ b/esp-hal/src/assist_debug.rs @@ -47,9 +47,9 @@ impl<'d> DebugAssist<'d> { } } -impl<'d> crate::private::Sealed for DebugAssist<'d> {} +impl crate::private::Sealed for DebugAssist<'_> {} -impl<'d> InterruptConfigurable for DebugAssist<'d> { +impl InterruptConfigurable for DebugAssist<'_> { fn set_interrupt_handler(&mut self, handler: InterruptHandler) { unsafe { crate::interrupt::bind_interrupt( @@ -66,7 +66,7 @@ impl<'d> InterruptConfigurable for DebugAssist<'d> { } #[cfg(assist_debug_sp_monitor)] -impl<'d> DebugAssist<'d> { +impl DebugAssist<'_> { /// Enable SP monitoring on main core. When the SP exceeds the /// `lower_bound` or `upper_bound` threshold, the module will record the PC /// pointer and generate an interrupt. @@ -228,7 +228,7 @@ impl<'d> DebugAssist<'d> { } #[cfg(assist_debug_region_monitor)] -impl<'d> DebugAssist<'d> { +impl DebugAssist<'_> { /// Enable region monitoring of read/write performed by the main CPU in a /// certain memory region0. Whenever the bus reads or writes in the /// specified memory region, an interrupt will be triggered. Two memory diff --git a/esp-hal/src/dma/m2m.rs b/esp-hal/src/dma/m2m.rs index 0e0aee187..c6e69984f 100644 --- a/esp-hal/src/dma/m2m.rs +++ b/esp-hal/src/dma/m2m.rs @@ -157,7 +157,7 @@ where } } -impl<'d, MODE> DmaSupport for Mem2Mem<'d, MODE> +impl DmaSupport for Mem2Mem<'_, MODE> where MODE: Mode, { diff --git a/esp-hal/src/dma/mod.rs b/esp-hal/src/dma/mod.rs index 0e80eefdd..bd2754cf7 100644 --- a/esp-hal/src/dma/mod.rs +++ b/esp-hal/src/dma/mod.rs @@ -1685,9 +1685,9 @@ where } } -impl<'a, CH> crate::private::Sealed for ChannelRx<'a, CH> where CH: DmaChannel {} +impl crate::private::Sealed for ChannelRx<'_, CH> where CH: DmaChannel {} -impl<'a, CH> Rx for ChannelRx<'a, CH> +impl Rx for ChannelRx<'_, CH> where CH: DmaChannel, { @@ -1901,9 +1901,9 @@ where } } -impl<'a, CH> crate::private::Sealed for ChannelTx<'a, CH> where CH: DmaChannel {} +impl crate::private::Sealed for ChannelTx<'_, CH> where CH: DmaChannel {} -impl<'a, CH> Tx for ChannelTx<'a, CH> +impl Tx for ChannelTx<'_, CH> where CH: DmaChannel, { @@ -2113,7 +2113,7 @@ where phantom: PhantomData, } -impl<'d, C> Channel<'d, C, crate::Blocking> +impl Channel<'_, C, crate::Blocking> where C: DmaChannel, { @@ -2272,7 +2272,7 @@ where } } -impl<'a, I> Drop for DmaTransferTx<'a, I> +impl Drop for DmaTransferTx<'_, I> where I: dma_private::DmaSupportTx, { @@ -2325,7 +2325,7 @@ where } } -impl<'a, I> Drop for DmaTransferRx<'a, I> +impl Drop for DmaTransferRx<'_, I> where I: dma_private::DmaSupportRx, { @@ -2384,7 +2384,7 @@ where } } -impl<'a, I> Drop for DmaTransferRxTx<'a, I> +impl Drop for DmaTransferRxTx<'_, I> where I: dma_private::DmaSupportTx + dma_private::DmaSupportRx, { @@ -2457,7 +2457,7 @@ where } } -impl<'a, I> Drop for DmaTransferTxCircular<'a, I> +impl Drop for DmaTransferTxCircular<'_, I> where I: dma_private::DmaSupportTx, { @@ -2514,7 +2514,7 @@ where } } -impl<'a, I> Drop for DmaTransferRxCircular<'a, I> +impl Drop for DmaTransferRxCircular<'_, I> where I: dma_private::DmaSupportRx, { @@ -2545,7 +2545,7 @@ pub(crate) mod asynch { } } - impl<'a, TX> core::future::Future for DmaTxFuture<'a, TX> + impl core::future::Future for DmaTxFuture<'_, TX> where TX: Tx, { @@ -2574,7 +2574,7 @@ pub(crate) mod asynch { } } - impl<'a, TX> Drop for DmaTxFuture<'a, TX> + impl Drop for DmaTxFuture<'_, TX> where TX: Tx, { @@ -2601,7 +2601,7 @@ pub(crate) mod asynch { } } - impl<'a, RX> core::future::Future for DmaRxFuture<'a, RX> + impl core::future::Future for DmaRxFuture<'_, RX> where RX: Rx, { @@ -2634,7 +2634,7 @@ pub(crate) mod asynch { } } - impl<'a, RX> Drop for DmaRxFuture<'a, RX> + impl Drop for DmaRxFuture<'_, RX> where RX: Rx, { @@ -2667,7 +2667,7 @@ pub(crate) mod asynch { } #[cfg(any(i2s0, i2s1))] - impl<'a, TX> core::future::Future for DmaTxDoneChFuture<'a, TX> + impl core::future::Future for DmaTxDoneChFuture<'_, TX> where TX: Tx, { @@ -2701,7 +2701,7 @@ pub(crate) mod asynch { } #[cfg(any(i2s0, i2s1))] - impl<'a, TX> Drop for DmaTxDoneChFuture<'a, TX> + impl Drop for DmaTxDoneChFuture<'_, TX> where TX: Tx, { @@ -2731,7 +2731,7 @@ pub(crate) mod asynch { } #[cfg(any(i2s0, i2s1))] - impl<'a, RX> core::future::Future for DmaRxDoneChFuture<'a, RX> + impl core::future::Future for DmaRxDoneChFuture<'_, RX> where RX: Rx, { @@ -2769,7 +2769,7 @@ pub(crate) mod asynch { } #[cfg(any(i2s0, i2s1))] - impl<'a, RX> Drop for DmaRxDoneChFuture<'a, RX> + impl Drop for DmaRxDoneChFuture<'_, RX> where RX: Rx, { diff --git a/esp-hal/src/ecc.rs b/esp-hal/src/ecc.rs index 10d0a17fa..59ee1f891 100644 --- a/esp-hal/src/ecc.rs +++ b/esp-hal/src/ecc.rs @@ -113,9 +113,9 @@ impl<'d> Ecc<'d, crate::Blocking> { } } -impl<'d> crate::private::Sealed for Ecc<'d, crate::Blocking> {} +impl crate::private::Sealed for Ecc<'_, crate::Blocking> {} -impl<'d> InterruptConfigurable for Ecc<'d, crate::Blocking> { +impl InterruptConfigurable for Ecc<'_, crate::Blocking> { fn set_interrupt_handler(&mut self, handler: InterruptHandler) { unsafe { crate::interrupt::bind_interrupt(crate::peripherals::Interrupt::ECC, handler.handler()); @@ -125,7 +125,7 @@ impl<'d> InterruptConfigurable for Ecc<'d, crate::Blocking> { } } -impl<'d, DM: crate::Mode> Ecc<'d, DM> { +impl Ecc<'_, DM> { /// Resets the ECC peripheral. pub fn reset(&mut self) { self.ecc.mult_conf().reset() diff --git a/esp-hal/src/etm.rs b/esp-hal/src/etm.rs index 1e8322c18..692594c92 100644 --- a/esp-hal/src/etm.rs +++ b/esp-hal/src/etm.rs @@ -123,7 +123,7 @@ where _task: &'a T, } -impl<'a, E, T, const C: u8> Drop for EtmConfiguredChannel<'a, E, T, C> +impl Drop for EtmConfiguredChannel<'_, E, T, C> where E: EtmEvent, T: EtmTask, diff --git a/esp-hal/src/gpio/etm.rs b/esp-hal/src/gpio/etm.rs index bc5958256..262536ad1 100644 --- a/esp-hal/src/gpio/etm.rs +++ b/esp-hal/src/gpio/etm.rs @@ -202,12 +202,12 @@ where _pin: PeripheralRef<'d, PIN>, } -impl<'d, PIN, const C: u8> private::Sealed for GpioEtmEventChannelRising<'d, PIN, C> where +impl private::Sealed for GpioEtmEventChannelRising<'_, PIN, C> where PIN: super::Pin { } -impl<'d, PIN, const C: u8> crate::etm::EtmEvent for GpioEtmEventChannelRising<'d, PIN, C> +impl crate::etm::EtmEvent for GpioEtmEventChannelRising<'_, PIN, C> where PIN: super::Pin, { @@ -225,12 +225,12 @@ where _pin: PeripheralRef<'d, PIN>, } -impl<'d, PIN, const C: u8> private::Sealed for GpioEtmEventChannelFalling<'d, PIN, C> where +impl private::Sealed for GpioEtmEventChannelFalling<'_, PIN, C> where PIN: super::Pin { } -impl<'d, PIN, const C: u8> crate::etm::EtmEvent for GpioEtmEventChannelFalling<'d, PIN, C> +impl crate::etm::EtmEvent for GpioEtmEventChannelFalling<'_, PIN, C> where PIN: super::Pin, { @@ -248,12 +248,9 @@ where _pin: PeripheralRef<'d, PIN>, } -impl<'d, PIN, const C: u8> private::Sealed for GpioEtmEventChannelAny<'d, PIN, C> where - PIN: super::Pin -{ -} +impl private::Sealed for GpioEtmEventChannelAny<'_, PIN, C> where PIN: super::Pin {} -impl<'d, PIN, const C: u8> crate::etm::EtmEvent for GpioEtmEventChannelAny<'d, PIN, C> +impl crate::etm::EtmEvent for GpioEtmEventChannelAny<'_, PIN, C> where PIN: super::Pin, { @@ -372,9 +369,9 @@ where _pin: PeripheralRef<'d, PIN>, } -impl<'d, PIN, const C: u8> private::Sealed for GpioEtmTaskSet<'d, PIN, C> where PIN: super::Pin {} +impl private::Sealed for GpioEtmTaskSet<'_, PIN, C> where PIN: super::Pin {} -impl<'d, PIN, const C: u8> crate::etm::EtmTask for GpioEtmTaskSet<'d, PIN, C> +impl crate::etm::EtmTask for GpioEtmTaskSet<'_, PIN, C> where PIN: super::Pin, { @@ -389,9 +386,9 @@ pub struct GpioEtmTaskClear<'d, PIN, const C: u8> { _pin: PeripheralRef<'d, PIN>, } -impl<'d, PIN, const C: u8> private::Sealed for GpioEtmTaskClear<'d, PIN, C> where PIN: super::Pin {} +impl private::Sealed for GpioEtmTaskClear<'_, PIN, C> where PIN: super::Pin {} -impl<'d, PIN, const C: u8> crate::etm::EtmTask for GpioEtmTaskClear<'d, PIN, C> +impl crate::etm::EtmTask for GpioEtmTaskClear<'_, PIN, C> where PIN: super::Pin, { @@ -406,9 +403,9 @@ pub struct GpioEtmTaskToggle<'d, PIN, const C: u8> { _pin: PeripheralRef<'d, PIN>, } -impl<'d, PIN, const C: u8> private::Sealed for GpioEtmTaskToggle<'d, PIN, C> where PIN: super::Pin {} +impl private::Sealed for GpioEtmTaskToggle<'_, PIN, C> where PIN: super::Pin {} -impl<'d, PIN, const C: u8> crate::etm::EtmTask for GpioEtmTaskToggle<'d, PIN, C> +impl crate::etm::EtmTask for GpioEtmTaskToggle<'_, PIN, C> where PIN: super::Pin, { diff --git a/esp-hal/src/gpio/mod.rs b/esp-hal/src/gpio/mod.rs index bc8199cf3..02eff2d7d 100644 --- a/esp-hal/src/gpio/mod.rs +++ b/esp-hal/src/gpio/mod.rs @@ -83,7 +83,6 @@ pub mod lp_io; pub mod rtc_io; /// Convenience constant for `Option::None` pin - static USER_INTERRUPT_HANDLER: CFnPtr = CFnPtr::new(); struct CFnPtr(AtomicPtr<()>); @@ -1129,7 +1128,7 @@ pub struct Output<'d, P = AnyPin> { impl

private::Sealed for Output<'_, P> {} -impl<'d, P> Peripheral for Output<'d, P> { +impl

Peripheral for Output<'_, P> { type P = P; unsafe fn clone_unchecked(&self) -> P { self.pin.clone_unchecked() @@ -1232,7 +1231,7 @@ pub struct Input<'d, P = AnyPin> { impl

private::Sealed for Input<'_, P> {} -impl<'d, P> Peripheral for Input<'d, P> { +impl

Peripheral for Input<'_, P> { type P = P; unsafe fn clone_unchecked(&self) -> P { self.pin.clone_unchecked() @@ -1330,7 +1329,7 @@ pub struct OutputOpenDrain<'d, P = AnyPin> { impl

private::Sealed for OutputOpenDrain<'_, P> {} -impl<'d, P> Peripheral for OutputOpenDrain<'d, P> { +impl

Peripheral for OutputOpenDrain<'_, P> { type P = P; unsafe fn clone_unchecked(&self) -> P { self.pin.clone_unchecked() @@ -1461,7 +1460,7 @@ pub struct Flex<'d, P = AnyPin> { impl

private::Sealed for Flex<'_, P> {} -impl<'d, P> Peripheral for Flex<'d, P> { +impl

Peripheral for Flex<'_, P> { type P = P; unsafe fn clone_unchecked(&self) -> P { core::ptr::read(&*self.pin as *const _) @@ -1490,7 +1489,7 @@ where } } -impl<'d, P> Flex<'d, P> +impl

Flex<'_, P> where P: InputPin, { @@ -1589,7 +1588,7 @@ where } } -impl<'d, P> Flex<'d, P> +impl

Flex<'_, P> where P: OutputPin, { @@ -1658,7 +1657,7 @@ where } } -impl<'d, P> Flex<'d, P> +impl

Flex<'_, P> where P: InputPin + OutputPin, { @@ -1843,7 +1842,7 @@ mod asynch { pub(super) static PIN_WAKERS: [AtomicWaker; NUM_PINS] = [const { AtomicWaker::new() }; NUM_PINS]; - impl<'d, P> Flex<'d, P> + impl

Flex<'_, P> where P: InputPin, { @@ -1880,7 +1879,7 @@ mod asynch { } } - impl<'d, P> Input<'d, P> + impl

Input<'_, P> where P: InputPin, { @@ -1945,7 +1944,7 @@ mod embedded_hal_02_impls { use super::*; - impl<'d, P> digital::InputPin for Input<'d, P> + impl

digital::InputPin for Input<'_, P> where P: InputPin, { @@ -1959,7 +1958,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::OutputPin for Output<'d, P> + impl

digital::OutputPin for Output<'_, P> where P: OutputPin, { @@ -1975,7 +1974,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::StatefulOutputPin for Output<'d, P> + impl

digital::StatefulOutputPin for Output<'_, P> where P: OutputPin, { @@ -1987,7 +1986,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::ToggleableOutputPin for Output<'d, P> + impl

digital::ToggleableOutputPin for Output<'_, P> where P: OutputPin, { @@ -1999,7 +1998,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::InputPin for OutputOpenDrain<'d, P> + impl

digital::InputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2013,7 +2012,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::OutputPin for OutputOpenDrain<'d, P> + impl

digital::OutputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2030,7 +2029,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::StatefulOutputPin for OutputOpenDrain<'d, P> + impl

digital::StatefulOutputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2042,7 +2041,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::ToggleableOutputPin for OutputOpenDrain<'d, P> + impl

digital::ToggleableOutputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2054,7 +2053,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::InputPin for Flex<'d, P> + impl

digital::InputPin for Flex<'_, P> where P: InputPin + OutputPin, { @@ -2068,7 +2067,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::OutputPin for Flex<'d, P> + impl

digital::OutputPin for Flex<'_, P> where P: InputPin + OutputPin, { @@ -2084,7 +2083,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::StatefulOutputPin for Flex<'d, P> + impl

digital::StatefulOutputPin for Flex<'_, P> where P: InputPin + OutputPin, { @@ -2096,7 +2095,7 @@ mod embedded_hal_02_impls { } } - impl<'d, P> digital::ToggleableOutputPin for Flex<'d, P> + impl

digital::ToggleableOutputPin for Flex<'_, P> where P: InputPin + OutputPin, { @@ -2114,14 +2113,14 @@ mod embedded_hal_impls { use super::*; - impl<'d, P> digital::ErrorType for Input<'d, P> + impl

digital::ErrorType for Input<'_, P> where P: InputPin, { type Error = core::convert::Infallible; } - impl<'d, P> digital::InputPin for Input<'d, P> + impl

digital::InputPin for Input<'_, P> where P: InputPin, { @@ -2134,14 +2133,14 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::ErrorType for Output<'d, P> + impl

digital::ErrorType for Output<'_, P> where P: OutputPin, { type Error = core::convert::Infallible; } - impl<'d, P> digital::OutputPin for Output<'d, P> + impl

digital::OutputPin for Output<'_, P> where P: OutputPin, { @@ -2156,7 +2155,7 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::StatefulOutputPin for Output<'d, P> + impl

digital::StatefulOutputPin for Output<'_, P> where P: OutputPin, { @@ -2169,7 +2168,7 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::InputPin for OutputOpenDrain<'d, P> + impl

digital::InputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2182,14 +2181,14 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::ErrorType for OutputOpenDrain<'d, P> + impl

digital::ErrorType for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { type Error = core::convert::Infallible; } - impl<'d, P> digital::OutputPin for OutputOpenDrain<'d, P> + impl

digital::OutputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2204,7 +2203,7 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::StatefulOutputPin for OutputOpenDrain<'d, P> + impl

digital::StatefulOutputPin for OutputOpenDrain<'_, P> where P: InputPin + OutputPin, { @@ -2217,7 +2216,7 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::InputPin for Flex<'d, P> + impl

digital::InputPin for Flex<'_, P> where P: InputPin, { @@ -2230,11 +2229,11 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::ErrorType for Flex<'d, P> { + impl

digital::ErrorType for Flex<'_, P> { type Error = core::convert::Infallible; } - impl<'d, P> digital::OutputPin for Flex<'d, P> + impl

digital::OutputPin for Flex<'_, P> where P: OutputPin, { @@ -2249,7 +2248,7 @@ mod embedded_hal_impls { } } - impl<'d, P> digital::StatefulOutputPin for Flex<'d, P> + impl

digital::StatefulOutputPin for Flex<'_, P> where P: OutputPin, { @@ -2268,7 +2267,7 @@ mod embedded_hal_async_impls { use super::*; - impl<'d, P> Wait for Flex<'d, P> + impl

Wait for Flex<'_, P> where P: InputPin, { @@ -2298,7 +2297,7 @@ mod embedded_hal_async_impls { } } - impl<'d, P> Wait for Input<'d, P> + impl

Wait for Input<'_, P> where P: InputPin, { diff --git a/esp-hal/src/i2c.rs b/esp-hal/src/i2c.rs index 9eb4219e3..8b919fd6c 100644 --- a/esp-hal/src/i2c.rs +++ b/esp-hal/src/i2c.rs @@ -587,9 +587,9 @@ where } } -impl<'d, T> crate::private::Sealed for I2c<'d, Blocking, T> where T: Instance {} +impl crate::private::Sealed for I2c<'_, Blocking, T> where T: Instance {} -impl<'d, T> InterruptConfigurable for I2c<'d, Blocking, T> +impl InterruptConfigurable for I2c<'_, Blocking, T> where T: Instance, { @@ -745,7 +745,7 @@ mod asynch { } #[cfg(not(esp32))] - impl<'a, T> core::future::Future for I2cFuture<'a, T> + impl core::future::Future for I2cFuture<'_, T> where T: Instance, { @@ -1158,7 +1158,7 @@ mod asynch { } } - impl<'d, T> embedded_hal_async::i2c::I2c for I2c<'d, Async, T> + impl embedded_hal_async::i2c::I2c for I2c<'_, Async, T> where T: Instance, { diff --git a/esp-hal/src/i2s.rs b/esp-hal/src/i2s.rs index fcbd7eab4..6b9f44ad1 100644 --- a/esp-hal/src/i2s.rs +++ b/esp-hal/src/i2s.rs @@ -314,7 +314,7 @@ where } } -impl<'d, DmaMode, T> I2s<'d, DmaMode, T> +impl I2s<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -352,14 +352,14 @@ where } } -impl<'d, DmaMode, I> crate::private::Sealed for I2s<'d, DmaMode, I> +impl crate::private::Sealed for I2s<'_, DmaMode, I> where I: RegisterAccess, DmaMode: Mode, { } -impl<'d, DmaMode, I> InterruptConfigurable for I2s<'d, DmaMode, I> +impl InterruptConfigurable for I2s<'_, DmaMode, I> where I: RegisterAccess, DmaMode: Mode, @@ -453,7 +453,7 @@ where phantom: PhantomData, } -impl<'d, DmaMode, T> core::fmt::Debug for I2sTx<'d, DmaMode, T> +impl core::fmt::Debug for I2sTx<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -463,7 +463,7 @@ where } } -impl<'d, DmaMode, T> DmaSupport for I2sTx<'d, DmaMode, T> +impl DmaSupport for I2sTx<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -493,7 +493,7 @@ where } } -impl<'d, DmaMode, T> I2sTx<'d, DmaMode, T> +impl I2sTx<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -586,7 +586,7 @@ where phantom: PhantomData, } -impl<'d, DmaMode, T> core::fmt::Debug for I2sRx<'d, DmaMode, T> +impl core::fmt::Debug for I2sRx<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -596,7 +596,7 @@ where } } -impl<'d, DmaMode, T> DmaSupport for I2sRx<'d, DmaMode, T> +impl DmaSupport for I2sRx<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -626,7 +626,7 @@ where } } -impl<'d, DmaMode, T> I2sRx<'d, DmaMode, T> +impl I2sRx<'_, DmaMode, T> where T: RegisterAccess, DmaMode: Mode, @@ -1941,7 +1941,7 @@ pub mod asynch { _buffer: BUFFER, } - impl<'d, T, BUFFER> I2sWriteDmaTransferAsync<'d, BUFFER, T> + impl I2sWriteDmaTransferAsync<'_, BUFFER, T> where T: RegisterAccess, { @@ -2064,7 +2064,7 @@ pub mod asynch { _buffer: BUFFER, } - impl<'d, T, BUFFER> I2sReadDmaTransferAsync<'d, BUFFER, T> + impl I2sReadDmaTransferAsync<'_, BUFFER, T> where T: RegisterAccess, { diff --git a/esp-hal/src/ledc/channel.rs b/esp-hal/src/ledc/channel.rs index fa27cc368..a1f18c5ba 100644 --- a/esp-hal/src/ledc/channel.rs +++ b/esp-hal/src/ledc/channel.rs @@ -312,7 +312,7 @@ mod ehal1 { } } - impl<'a, S: TimerSpeed> ErrorType for Channel<'a, S> { + impl ErrorType for Channel<'_, S> { type Error = Error; } @@ -343,7 +343,7 @@ mod ehal1 { } } -impl<'a, S: crate::ledc::timer::TimerSpeed> Channel<'a, S> { +impl Channel<'_, S> { #[cfg(esp32)] fn set_channel(&mut self, timer_number: u8) { if S::IS_HS { @@ -541,7 +541,7 @@ impl<'a, S: crate::ledc::timer::TimerSpeed> Channel<'a, S> { } } -impl<'a, S> ChannelHW for Channel<'a, S> +impl ChannelHW for Channel<'_, S> where S: crate::ledc::timer::TimerSpeed, { diff --git a/esp-hal/src/ledc/timer.rs b/esp-hal/src/ledc/timer.rs index 6b6c0f8c1..051520c6e 100644 --- a/esp-hal/src/ledc/timer.rs +++ b/esp-hal/src/ledc/timer.rs @@ -306,7 +306,7 @@ impl<'a, S: TimerSpeed> Timer<'a, S> { } /// Timer HW implementation for LowSpeed timers -impl<'a> TimerHW for Timer<'a, LowSpeed> { +impl TimerHW for Timer<'_, LowSpeed> { /// Get the current source timer frequency from the HW fn get_freq_hw(&self) -> Option { self.clock_source.map(|source| match source { diff --git a/esp-hal/src/mcpwm/operator.rs b/esp-hal/src/mcpwm/operator.rs index 0b20764b3..d2df0a68e 100644 --- a/esp-hal/src/mcpwm/operator.rs +++ b/esp-hal/src/mcpwm/operator.rs @@ -413,8 +413,8 @@ impl<'d, PWM: PwmPeripheral, const OP: u8, const IS_A: bool> PwmPin<'d, PWM, OP, } } -impl<'d, PWM: PwmPeripheral, const OP: u8, const IS_A: bool> embedded_hal_02::PwmPin - for PwmPin<'d, PWM, OP, IS_A> +impl embedded_hal_02::PwmPin + for PwmPin<'_, PWM, OP, IS_A> { type Duty = u16; @@ -447,15 +447,15 @@ impl<'d, PWM: PwmPeripheral, const OP: u8, const IS_A: bool> embedded_hal_02::Pw } /// Implement no error type for the PwmPin because the method are infallible -impl<'d, PWM: PwmPeripheral, const OP: u8, const IS_A: bool> embedded_hal::pwm::ErrorType - for PwmPin<'d, PWM, OP, IS_A> +impl embedded_hal::pwm::ErrorType + for PwmPin<'_, PWM, OP, IS_A> { type Error = core::convert::Infallible; } /// Implement the trait SetDutyCycle for PwmPin -impl<'d, PWM: PwmPeripheral, const OP: u8, const IS_A: bool> embedded_hal::pwm::SetDutyCycle - for PwmPin<'d, PWM, OP, IS_A> +impl embedded_hal::pwm::SetDutyCycle + for PwmPin<'_, PWM, OP, IS_A> { /// Get the max duty of the PwmPin fn max_duty_cycle(&self) -> u16 { diff --git a/esp-hal/src/parl_io.rs b/esp-hal/src/parl_io.rs index 489786d92..0c4229d72 100644 --- a/esp-hal/src/parl_io.rs +++ b/esp-hal/src/parl_io.rs @@ -339,7 +339,7 @@ impl<'d> RxClkInPin<'d> { Self { pin, sample_edge } } } -impl<'d> RxClkPin for RxClkInPin<'d> { +impl RxClkPin for RxClkInPin<'_> { fn configure(&mut self) { let pcr = unsafe { &*crate::peripherals::PCR::PTR }; pcr.parl_clk_rx_conf() @@ -376,12 +376,12 @@ where } } -impl<'d, P> TxPins for TxPinConfigWithValidPin<'d, P> where +impl

TxPins for TxPinConfigWithValidPin<'_, P> where P: NotContainsValidSignalPin + TxPins + ConfigurePins { } -impl<'d, P> ConfigurePins for TxPinConfigWithValidPin<'d, P> +impl

ConfigurePins for TxPinConfigWithValidPin<'_, P> where P: NotContainsValidSignalPin + TxPins + ConfigurePins, { @@ -570,12 +570,12 @@ where } } -impl<'d, P> RxPins for RxPinConfigWithValidPin<'d, P> where +impl

RxPins for RxPinConfigWithValidPin<'_, P> where P: NotContainsValidSignalPin + RxPins + ConfigurePins { } -impl<'d, P> ConfigurePins for RxPinConfigWithValidPin<'d, P> +impl

ConfigurePins for RxPinConfigWithValidPin<'_, P> where P: NotContainsValidSignalPin + RxPins + ConfigurePins, { @@ -832,7 +832,7 @@ where phantom: PhantomData, } -impl<'d, DM> core::fmt::Debug for ParlIoTx<'d, DM> +impl core::fmt::Debug for ParlIoTx<'_, DM> where DM: Mode, { @@ -911,7 +911,7 @@ where phantom: PhantomData, } -impl<'d, DM> core::fmt::Debug for ParlIoRx<'d, DM> +impl core::fmt::Debug for ParlIoRx<'_, DM> where DM: Mode, { @@ -1040,7 +1040,7 @@ where } } -impl<'d> ParlIoFullDuplex<'d, Blocking> { +impl ParlIoFullDuplex<'_, Blocking> { /// Sets the interrupt handler, enables it with /// [crate::interrupt::Priority::min()] /// @@ -1070,9 +1070,9 @@ impl<'d> ParlIoFullDuplex<'d, Blocking> { } } -impl<'d> crate::private::Sealed for ParlIoFullDuplex<'d, Blocking> {} +impl crate::private::Sealed for ParlIoFullDuplex<'_, Blocking> {} -impl<'d> InterruptConfigurable for ParlIoFullDuplex<'d, Blocking> { +impl InterruptConfigurable for ParlIoFullDuplex<'_, Blocking> { fn set_interrupt_handler(&mut self, handler: crate::interrupt::InterruptHandler) { ParlIoFullDuplex::set_interrupt_handler(self, handler); } @@ -1115,7 +1115,7 @@ where } } -impl<'d> ParlIoTxOnly<'d, Blocking> { +impl ParlIoTxOnly<'_, Blocking> { /// Sets the interrupt handler, enables it with /// [crate::interrupt::Priority::min()] /// @@ -1145,9 +1145,9 @@ impl<'d> ParlIoTxOnly<'d, Blocking> { } } -impl<'d> crate::private::Sealed for ParlIoTxOnly<'d, Blocking> {} +impl crate::private::Sealed for ParlIoTxOnly<'_, Blocking> {} -impl<'d> InterruptConfigurable for ParlIoTxOnly<'d, Blocking> { +impl InterruptConfigurable for ParlIoTxOnly<'_, Blocking> { fn set_interrupt_handler(&mut self, handler: crate::interrupt::InterruptHandler) { ParlIoTxOnly::set_interrupt_handler(self, handler); } @@ -1190,7 +1190,7 @@ where } } -impl<'d> ParlIoRxOnly<'d, Blocking> { +impl ParlIoRxOnly<'_, Blocking> { /// Sets the interrupt handler, enables it with /// [crate::interrupt::Priority::min()] /// @@ -1220,9 +1220,9 @@ impl<'d> ParlIoRxOnly<'d, Blocking> { } } -impl<'d> crate::private::Sealed for ParlIoRxOnly<'d, Blocking> {} +impl crate::private::Sealed for ParlIoRxOnly<'_, Blocking> {} -impl<'d> InterruptConfigurable for ParlIoRxOnly<'d, Blocking> { +impl InterruptConfigurable for ParlIoRxOnly<'_, Blocking> { fn set_interrupt_handler(&mut self, handler: crate::interrupt::InterruptHandler) { ParlIoRxOnly::set_interrupt_handler(self, handler); } @@ -1261,7 +1261,7 @@ fn internal_init(frequency: HertzU32) -> Result<(), Error> { Ok(()) } -impl<'d, DM> ParlIoTx<'d, DM> +impl ParlIoTx<'_, DM> where DM: Mode, { @@ -1316,7 +1316,7 @@ where } } -impl<'d, DM> DmaSupport for ParlIoTx<'d, DM> +impl DmaSupport for ParlIoTx<'_, DM> where DM: Mode, { @@ -1405,7 +1405,7 @@ where } } -impl<'d, DM> DmaSupport for ParlIoRx<'d, DM> +impl DmaSupport for ParlIoRx<'_, DM> where DM: Mode, { @@ -1546,11 +1546,11 @@ pub mod asynch { } } - impl<'d> ParlIoTx<'d, crate::Async> { + impl ParlIoTx<'_, crate::Async> { /// Perform a DMA write. /// /// The maximum amount of data to be sent is 32736 bytes. - pub async fn write_dma_async<'t, TXBUF>(&mut self, words: &'t TXBUF) -> Result<(), Error> + pub async fn write_dma_async(&mut self, words: &TXBUF) -> Result<(), Error> where TXBUF: ReadBuffer, { @@ -1568,7 +1568,7 @@ pub mod asynch { } } - impl<'d> ParlIoRx<'d, crate::Async> { + impl ParlIoRx<'_, crate::Async> { /// Perform a DMA write. /// /// The maximum amount of data to be sent is 32736 bytes. diff --git a/esp-hal/src/pcnt/channel.rs b/esp-hal/src/pcnt/channel.rs index 34b1f9712..b85a4b05f 100644 --- a/esp-hal/src/pcnt/channel.rs +++ b/esp-hal/src/pcnt/channel.rs @@ -22,7 +22,7 @@ pub struct Channel<'d, const UNIT: usize, const NUM: usize> { _not_send: PhantomData<*const ()>, } -impl<'d, const UNIT: usize, const NUM: usize> Channel<'d, UNIT, NUM> { +impl Channel<'_, UNIT, NUM> { /// return a new Channel pub(super) fn new() -> Self { Self { diff --git a/esp-hal/src/pcnt/mod.rs b/esp-hal/src/pcnt/mod.rs index 4c4817c46..d7598a5e7 100644 --- a/esp-hal/src/pcnt/mod.rs +++ b/esp-hal/src/pcnt/mod.rs @@ -109,9 +109,9 @@ impl<'d> Pcnt<'d> { } } -impl<'d> crate::private::Sealed for Pcnt<'d> {} +impl crate::private::Sealed for Pcnt<'_> {} -impl<'d> InterruptConfigurable for Pcnt<'d> { +impl InterruptConfigurable for Pcnt<'_> { fn set_interrupt_handler(&mut self, handler: InterruptHandler) { unsafe { interrupt::bind_interrupt(Interrupt::PCNT, handler.handler()); diff --git a/esp-hal/src/pcnt/unit.rs b/esp-hal/src/pcnt/unit.rs index 1f0006f64..cdcaae783 100644 --- a/esp-hal/src/pcnt/unit.rs +++ b/esp-hal/src/pcnt/unit.rs @@ -84,7 +84,7 @@ pub struct Unit<'d, const NUM: usize> { pub channel1: Channel<'d, NUM, 1>, } -impl<'d, const NUM: usize> Unit<'d, NUM> { +impl Unit<'_, NUM> { /// return a new Unit pub(super) fn new() -> Self { Self { @@ -301,14 +301,14 @@ impl<'d, const NUM: usize> Unit<'d, NUM> { } } -impl<'d, const NUM: usize> Drop for Unit<'d, NUM> { +impl Drop for Unit<'_, NUM> { fn drop(&mut self) { // This is here to prevent the destructuring of Unit. } } // The entire Unit is Send but the individual channels are not. -unsafe impl<'d, const NUM: usize> Send for Unit<'d, NUM> {} +unsafe impl Send for Unit<'_, NUM> {} /// Represents the counter within a pulse counter unit. #[derive(Clone)] @@ -316,7 +316,7 @@ pub struct Counter<'d, const NUM: usize> { _phantom: PhantomData<&'d ()>, } -impl<'d, const NUM: usize> Counter<'d, NUM> { +impl Counter<'_, NUM> { fn new() -> Self { Self { _phantom: PhantomData, diff --git a/esp-hal/src/peripheral.rs b/esp-hal/src/peripheral.rs index 7d5b665e2..9b3c230e3 100644 --- a/esp-hal/src/peripheral.rs +++ b/esp-hal/src/peripheral.rs @@ -82,7 +82,7 @@ impl<'a, T> PeripheralRef<'a, T> { } } -impl<'a, T> Deref for PeripheralRef<'a, T> { +impl Deref for PeripheralRef<'_, T> { type Target = T; #[inline] @@ -91,7 +91,7 @@ impl<'a, T> Deref for PeripheralRef<'a, T> { } } -impl<'a, T> DerefMut for PeripheralRef<'a, T> { +impl DerefMut for PeripheralRef<'_, T> { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.inner diff --git a/esp-hal/src/rmt.rs b/esp-hal/src/rmt.rs index ef61e03e5..80f0d99fe 100644 --- a/esp-hal/src/rmt.rs +++ b/esp-hal/src/rmt.rs @@ -275,9 +275,9 @@ impl<'d> Rmt<'d, crate::Blocking> { } } -impl<'d> crate::private::Sealed for Rmt<'d, crate::Blocking> {} +impl crate::private::Sealed for Rmt<'_, crate::Blocking> {} -impl<'d> InterruptConfigurable for Rmt<'d, crate::Blocking> { +impl InterruptConfigurable for Rmt<'_, crate::Blocking> { fn set_interrupt_handler(&mut self, handler: crate::interrupt::InterruptHandler) { self.internal_set_interrupt_handler(handler); } @@ -448,7 +448,7 @@ where data: &'a [T], } -impl<'a, C, T: Into + Copy> SingleShotTxTransaction<'a, C, T> +impl + Copy> SingleShotTxTransaction<'_, C, T> where C: TxChannel, { @@ -1045,7 +1045,7 @@ where data: &'a mut [T], } -impl<'a, C, T: From + Copy> RxTransaction<'a, C, T> +impl + Copy> RxTransaction<'_, C, T> where C: RxChannel, { @@ -1163,7 +1163,7 @@ pub mod asynch { /// Start transmitting the given pulse code sequence. /// The length of sequence cannot exceed the size of the allocated RMT /// RAM. - async fn transmit<'a, T: Into + Copy>(&mut self, data: &'a [T]) -> Result<(), Error> + async fn transmit + Copy>(&mut self, data: &[T]) -> Result<(), Error> where Self: Sized, { @@ -1226,7 +1226,7 @@ pub mod asynch { /// Start receiving a pulse code sequence. /// The length of sequence cannot exceed the size of the allocated RMT /// RAM. - async fn receive<'a, T: From + Copy>(&mut self, data: &'a mut [T]) -> Result<(), Error> + async fn receive + Copy>(&mut self, data: &mut [T]) -> Result<(), Error> where Self: Sized, { diff --git a/esp-hal/src/rng.rs b/esp-hal/src/rng.rs index 8e469bd43..406a99808 100644 --- a/esp-hal/src/rng.rs +++ b/esp-hal/src/rng.rs @@ -164,7 +164,6 @@ impl rand_core::RngCore for Rng { /// let pin_value: u16 = nb::block!(adc1.read_oneshot(&mut adc1_pin)).unwrap(); /// # } /// ``` - pub struct Trng<'d> { /// The hardware random number generator instance. pub rng: Rng, @@ -211,7 +210,7 @@ impl<'d> Trng<'d> { } } -impl<'d> Drop for Trng<'d> { +impl Drop for Trng<'_> { fn drop(&mut self) { crate::soc::trng::revert_trng(); } diff --git a/esp-hal/src/rsa/esp32cX.rs b/esp-hal/src/rsa/esp32cX.rs index 084ba5473..88f4bf99a 100644 --- a/esp-hal/src/rsa/esp32cX.rs +++ b/esp-hal/src/rsa/esp32cX.rs @@ -10,7 +10,7 @@ use crate::rsa::{ RsaMultiplication, }; -impl<'d, DM: crate::Mode> Rsa<'d, DM> { +impl Rsa<'_, DM> { /// After the RSA Accelerator is released from reset, the memory blocks /// needs to be initialized, only after that peripheral should be used. /// This function would return without an error if the memory is initialized @@ -229,7 +229,7 @@ pub mod operand_sizes { ); } -impl<'a, 'd, T: RsaMode, DM: crate::Mode, const N: usize> RsaModularExponentiation<'a, 'd, T, DM> +impl<'d, T: RsaMode, DM: crate::Mode, const N: usize> RsaModularExponentiation<'_, 'd, T, DM> where T: RsaMode, { @@ -249,7 +249,7 @@ where } } -impl<'a, 'd, T: RsaMode, DM: crate::Mode, const N: usize> RsaModularMultiplication<'a, 'd, T, DM> +impl<'d, T: RsaMode, DM: crate::Mode, const N: usize> RsaModularMultiplication<'_, 'd, T, DM> where T: RsaMode, { @@ -262,7 +262,7 @@ where } } -impl<'a, 'd, T: RsaMode + Multi, DM: crate::Mode, const N: usize> RsaMultiplication<'a, 'd, T, DM> +impl<'d, T: RsaMode + Multi, DM: crate::Mode, const N: usize> RsaMultiplication<'_, 'd, T, DM> where T: RsaMode, { diff --git a/esp-hal/src/rsa/mod.rs b/esp-hal/src/rsa/mod.rs index d71668c0d..a92c6bb51 100644 --- a/esp-hal/src/rsa/mod.rs +++ b/esp-hal/src/rsa/mod.rs @@ -56,9 +56,9 @@ impl<'d> Rsa<'d, crate::Blocking> { } } -impl<'d> crate::private::Sealed for Rsa<'d, crate::Blocking> {} +impl crate::private::Sealed for Rsa<'_, crate::Blocking> {} -impl<'d> InterruptConfigurable for Rsa<'d, crate::Blocking> { +impl InterruptConfigurable for Rsa<'_, crate::Blocking> { fn set_interrupt_handler(&mut self, handler: InterruptHandler) { self.internal_set_interrupt_handler(handler); } @@ -435,7 +435,7 @@ pub(crate) mod asynch { } } - impl<'a, 'd, T: RsaMode, const N: usize> RsaModularExponentiation<'a, 'd, T, Async> + impl RsaModularExponentiation<'_, '_, T, Async> where T: RsaMode, { @@ -454,7 +454,7 @@ pub(crate) mod asynch { } } - impl<'a, 'd, T: RsaMode, const N: usize> RsaModularMultiplication<'a, 'd, T, Async> + impl RsaModularMultiplication<'_, '_, T, Async> where T: RsaMode, { @@ -483,12 +483,12 @@ pub(crate) mod asynch { } } - impl<'a, 'd, T: RsaMode + Multi, const N: usize> RsaMultiplication<'a, 'd, T, Async> + impl RsaMultiplication<'_, '_, T, Async> where T: RsaMode, { /// Asynchronously performs an RSA multiplication operation. - pub async fn multiplication<'b, const O: usize>( + pub async fn multiplication( &mut self, operand_b: &T::InputType, outbuf: &mut T::OutputType, diff --git a/esp-hal/src/rtc_cntl/mod.rs b/esp-hal/src/rtc_cntl/mod.rs index c63c7538f..140e9c42c 100644 --- a/esp-hal/src/rtc_cntl/mod.rs +++ b/esp-hal/src/rtc_cntl/mod.rs @@ -430,9 +430,9 @@ impl<'d> Rtc<'d> { .modify(|r, w| unsafe { w.bits(r.bits() | Self::RTC_DISABLE_ROM_LOG) }); } } -impl<'d> crate::private::Sealed for Rtc<'d> {} +impl crate::private::Sealed for Rtc<'_> {} -impl<'d> InterruptConfigurable for Rtc<'d> { +impl InterruptConfigurable for Rtc<'_> { fn set_interrupt_handler(&mut self, handler: InterruptHandler) { unsafe { interrupt::bind_interrupt( diff --git a/esp-hal/src/rtc_cntl/sleep/esp32c2.rs b/esp-hal/src/rtc_cntl/sleep/esp32c2.rs index 7fb003fd1..ef690a704 100644 --- a/esp-hal/src/rtc_cntl/sleep/esp32c2.rs +++ b/esp-hal/src/rtc_cntl/sleep/esp32c2.rs @@ -157,7 +157,7 @@ impl WakeSource for TimerWakeupSource { } } -impl<'a, 'b> RtcioWakeupSource<'a, 'b> { +impl RtcioWakeupSource<'_, '_> { fn apply_pin(&self, pin: &mut dyn RtcPinWithResistors, level: WakeupLevel) { // The pullup/pulldown part is like in gpio_deep_sleep_wakeup_prepare let level = match level { diff --git a/esp-hal/src/rtc_cntl/sleep/esp32c3.rs b/esp-hal/src/rtc_cntl/sleep/esp32c3.rs index 39d165ce2..cd01c6361 100644 --- a/esp-hal/src/rtc_cntl/sleep/esp32c3.rs +++ b/esp-hal/src/rtc_cntl/sleep/esp32c3.rs @@ -157,7 +157,7 @@ impl WakeSource for TimerWakeupSource { } } -impl<'a, 'b> RtcioWakeupSource<'a, 'b> { +impl RtcioWakeupSource<'_, '_> { fn apply_pin(&self, pin: &mut dyn RtcPinWithResistors, level: WakeupLevel) { // The pullup/pulldown part is like in gpio_deep_sleep_wakeup_prepare let level = match level { diff --git a/esp-hal/src/sha.rs b/esp-hal/src/sha.rs index 6758ea2ec..b230f3b17 100644 --- a/esp-hal/src/sha.rs +++ b/esp-hal/src/sha.rs @@ -98,10 +98,10 @@ impl<'d> Sha<'d> { } } -impl<'d> crate::private::Sealed for Sha<'d> {} +impl crate::private::Sealed for Sha<'_> {} #[cfg(not(esp32))] -impl<'d> crate::InterruptConfigurable for Sha<'d> { +impl crate::InterruptConfigurable for Sha<'_> { fn set_interrupt_handler(&mut self, handler: crate::interrupt::InterruptHandler) { unsafe { crate::interrupt::bind_interrupt(crate::peripherals::Interrupt::SHA, handler.handler()); diff --git a/esp-hal/src/spi/master.rs b/esp-hal/src/spi/master.rs index 6241aa2b1..3e54ad3dd 100644 --- a/esp-hal/src/spi/master.rs +++ b/esp-hal/src/spi/master.rs @@ -448,7 +448,7 @@ where } } -impl<'d, T> Spi<'d, T> +impl Spi<'_, T> where T: Instance, { @@ -845,7 +845,7 @@ mod dma { { } - impl<'d, M, T> core::fmt::Debug for SpiDma<'d, M, T> + impl core::fmt::Debug for SpiDma<'_, M, T> where T: InstanceDma, M: Mode, @@ -859,7 +859,7 @@ mod dma { } } - impl<'d, T> InterruptConfigurable for SpiDma<'d, Blocking, T> + impl InterruptConfigurable for SpiDma<'_, Blocking, T> where T: InstanceDma, { @@ -874,7 +874,7 @@ mod dma { } #[cfg(gdma)] - impl<'d, T> SpiDma<'d, Blocking, T> + impl SpiDma<'_, Blocking, T> where T: InstanceDma, { @@ -1074,7 +1074,7 @@ mod dma { } } - impl<'d, M, T> crate::private::Sealed for SpiDma<'d, M, T> + impl crate::private::Sealed for SpiDma<'_, M, T> where T: InstanceDma, M: Mode, @@ -1162,7 +1162,7 @@ mod dma { } } - impl<'d, M, T, Buf> Drop for SpiDmaTransfer<'d, M, Buf, T> + impl Drop for SpiDmaTransfer<'_, M, Buf, T> where T: InstanceDma, M: Mode, @@ -1180,7 +1180,7 @@ mod dma { } } - impl<'d, T, Buf> SpiDmaTransfer<'d, crate::Async, Buf, T> + impl SpiDmaTransfer<'_, crate::Async, Buf, T> where T: InstanceDma, { @@ -1485,7 +1485,7 @@ mod dma { } } - impl<'d, T> InterruptConfigurable for SpiDmaBus<'d, Blocking, T> + impl InterruptConfigurable for SpiDmaBus<'_, Blocking, T> where T: InstanceDma, { @@ -1498,7 +1498,7 @@ mod dma { } #[cfg(gdma)] - impl<'d, T> SpiDmaBus<'d, Blocking, T> + impl SpiDmaBus<'_, Blocking, T> where T: InstanceDma, { @@ -1523,14 +1523,14 @@ mod dma { } } - impl<'d, M, T> crate::private::Sealed for SpiDmaBus<'d, M, T> + impl crate::private::Sealed for SpiDmaBus<'_, M, T> where T: InstanceDma, M: Mode, { } - impl<'d, M, T> SpiDmaBus<'d, M, T> + impl SpiDmaBus<'_, M, T> where T: InstanceDma, M: Mode, @@ -1630,7 +1630,7 @@ mod dma { } } - impl<'d, M, T> SpiDmaBus<'d, M, T> + impl SpiDmaBus<'_, M, T> where T: InstanceDma, M: Mode, @@ -1699,7 +1699,7 @@ mod dma { } } - impl<'d, T> embedded_hal_02::blocking::spi::Transfer for SpiDmaBus<'d, crate::Blocking, T> + impl embedded_hal_02::blocking::spi::Transfer for SpiDmaBus<'_, crate::Blocking, T> where T: InstanceDma, { @@ -1711,7 +1711,7 @@ mod dma { } } - impl<'d, T> embedded_hal_02::blocking::spi::Write for SpiDmaBus<'d, crate::Blocking, T> + impl embedded_hal_02::blocking::spi::Write for SpiDmaBus<'_, crate::Blocking, T> where T: InstanceDma, { @@ -1770,7 +1770,7 @@ mod dma { } } - impl<'d, T> SpiDmaBus<'d, crate::Async, T> + impl SpiDmaBus<'_, crate::Async, T> where T: InstanceDma, { @@ -1884,7 +1884,7 @@ mod dma { } } - impl<'d, T> embedded_hal_async::spi::SpiBus for SpiDmaBus<'d, crate::Async, T> + impl embedded_hal_async::spi::SpiBus for SpiDmaBus<'_, crate::Async, T> where T: InstanceDma, { @@ -1916,7 +1916,7 @@ mod dma { use super::*; - impl<'d, M, T> ErrorType for SpiDmaBus<'d, M, T> + impl ErrorType for SpiDmaBus<'_, M, T> where T: InstanceDma, M: Mode, @@ -1924,7 +1924,7 @@ mod dma { type Error = Error; } - impl<'d, M, T> SpiBus for SpiDmaBus<'d, M, T> + impl SpiBus for SpiDmaBus<'_, M, T> where T: InstanceDma, M: Mode, diff --git a/esp-hal/src/spi/slave.rs b/esp-hal/src/spi/slave.rs index 97315ab6f..0447c1870 100644 --- a/esp-hal/src/spi/slave.rs +++ b/esp-hal/src/spi/slave.rs @@ -227,7 +227,7 @@ pub mod dma { tx_chain: DescriptorChain, } - impl<'d, DmaMode, T> core::fmt::Debug for SpiDma<'d, DmaMode, T> + impl core::fmt::Debug for SpiDma<'_, DmaMode, T> where T: InstanceDma, DmaMode: Mode, @@ -237,7 +237,7 @@ pub mod dma { } } - impl<'d, DmaMode, T> DmaSupport for SpiDma<'d, DmaMode, T> + impl DmaSupport for SpiDma<'_, DmaMode, T> where T: InstanceDma, DmaMode: Mode, diff --git a/esp-hal/src/sync.rs b/esp-hal/src/sync.rs index 0b50edfba..6d9ccfaab 100644 --- a/esp-hal/src/sync.rs +++ b/esp-hal/src/sync.rs @@ -248,7 +248,7 @@ pub(crate) fn lock(lock: &Lock, f: impl FnOnce() -> T) -> T { } } - impl<'a> Drop for LockGuard<'a> { + impl Drop for LockGuard<'_> { fn drop(&mut self) { unsafe { self.lock.release(self.token) }; } diff --git a/esp-hal/src/timer/mod.rs b/esp-hal/src/timer/mod.rs index d0ffb517c..de0c4e4da 100644 --- a/esp-hal/src/timer/mod.rs +++ b/esp-hal/src/timer/mod.rs @@ -201,9 +201,9 @@ where } } -impl<'d, T> crate::private::Sealed for OneShotTimer<'d, T> where T: Timer {} +impl crate::private::Sealed for OneShotTimer<'_, T> where T: Timer {} -impl<'d, T> InterruptConfigurable for OneShotTimer<'d, T> +impl InterruptConfigurable for OneShotTimer<'_, T> where T: Timer, { @@ -212,7 +212,7 @@ where } } -impl<'d, T, UXX> embedded_hal_02::blocking::delay::DelayMs for OneShotTimer<'d, T> +impl embedded_hal_02::blocking::delay::DelayMs for OneShotTimer<'_, T> where T: Timer, UXX: Into, @@ -222,7 +222,7 @@ where } } -impl<'d, T, UXX> embedded_hal_02::blocking::delay::DelayUs for OneShotTimer<'d, T> +impl embedded_hal_02::blocking::delay::DelayUs for OneShotTimer<'_, T> where T: Timer, UXX: Into, @@ -232,7 +232,7 @@ where } } -impl<'d, T> embedded_hal::delay::DelayNs for OneShotTimer<'d, T> +impl embedded_hal::delay::DelayNs for OneShotTimer<'_, T> where T: Timer, { @@ -315,9 +315,9 @@ where } } -impl<'d, T> crate::private::Sealed for PeriodicTimer<'d, T> where T: Timer {} +impl crate::private::Sealed for PeriodicTimer<'_, T> where T: Timer {} -impl<'d, T> InterruptConfigurable for PeriodicTimer<'d, T> +impl InterruptConfigurable for PeriodicTimer<'_, T> where T: Timer, { @@ -326,7 +326,7 @@ where } } -impl<'d, T> embedded_hal_02::timer::CountDown for PeriodicTimer<'d, T> +impl embedded_hal_02::timer::CountDown for PeriodicTimer<'_, T> where T: Timer, { @@ -344,7 +344,7 @@ where } } -impl<'d, T> embedded_hal_02::timer::Cancel for PeriodicTimer<'d, T> +impl embedded_hal_02::timer::Cancel for PeriodicTimer<'_, T> where T: Timer, { @@ -355,7 +355,7 @@ where } } -impl<'d, T> embedded_hal_02::timer::Periodic for PeriodicTimer<'d, T> where T: Timer {} +impl embedded_hal_02::timer::Periodic for PeriodicTimer<'_, T> where T: Timer {} /// An enum of all timer types enum AnyTimerInner { diff --git a/esp-hal/src/timer/systimer.rs b/esp-hal/src/timer/systimer.rs index 7ecbd9f5e..de70e909e 100644 --- a/esp-hal/src/timer/systimer.rs +++ b/esp-hal/src/timer/systimer.rs @@ -368,13 +368,13 @@ pub trait Unit { #[derive(Debug)] pub struct SpecificUnit<'d, const CHANNEL: u8>(PhantomData<&'d ()>); -impl<'d, const CHANNEL: u8> SpecificUnit<'d, CHANNEL> { +impl SpecificUnit<'_, CHANNEL> { fn new() -> Self { Self(PhantomData) } } -impl<'d, const CHANNEL: u8> Unit for SpecificUnit<'d, CHANNEL> { +impl Unit for SpecificUnit<'_, CHANNEL> { fn channel(&self) -> u8 { CHANNEL } @@ -384,7 +384,7 @@ impl<'d, const CHANNEL: u8> Unit for SpecificUnit<'d, CHANNEL> { #[derive(Debug)] pub struct AnyUnit<'d>(PhantomData<&'d ()>, u8); -impl<'d> Unit for AnyUnit<'d> { +impl Unit for AnyUnit<'_> { fn channel(&self) -> u8 { self.1 } @@ -598,13 +598,13 @@ pub trait Comparator { #[derive(Debug)] pub struct SpecificComparator<'d, const CHANNEL: u8>(PhantomData<&'d ()>); -impl<'d, const CHANNEL: u8> SpecificComparator<'d, CHANNEL> { +impl SpecificComparator<'_, CHANNEL> { fn new() -> Self { Self(PhantomData) } } -impl<'d, const CHANNEL: u8> Comparator for SpecificComparator<'d, CHANNEL> { +impl Comparator for SpecificComparator<'_, CHANNEL> { fn channel(&self) -> u8 { CHANNEL } @@ -614,7 +614,7 @@ impl<'d, const CHANNEL: u8> Comparator for SpecificComparator<'d, CHANNEL> { #[derive(Debug)] pub struct AnyComparator<'d>(PhantomData<&'d ()>, u8); -impl<'d> Comparator for AnyComparator<'d> { +impl Comparator for AnyComparator<'_> { fn channel(&self) -> u8 { self.1 } @@ -737,7 +737,7 @@ where _pd: PhantomData<(MODE, DM)>, } -impl<'d, T, DM, COMP: Comparator, UNIT: Unit> Debug for Alarm<'d, T, DM, COMP, UNIT> +impl Debug for Alarm<'_, T, DM, COMP, UNIT> where DM: Mode, { @@ -771,9 +771,7 @@ impl<'d, T, COMP: Comparator, UNIT: Unit> Alarm<'d, T, Async, COMP, UNIT> { } } -impl<'d, T, COMP: Comparator, UNIT: Unit> InterruptConfigurable - for Alarm<'d, T, Blocking, COMP, UNIT> -{ +impl InterruptConfigurable for Alarm<'_, T, Blocking, COMP, UNIT> { fn set_interrupt_handler(&mut self, handler: InterruptHandler) { self.comparator.set_interrupt_handler(handler) } @@ -851,14 +849,12 @@ where } } -impl<'d, T, DM, COMP: Comparator, UNIT: Unit> crate::private::Sealed - for Alarm<'d, T, DM, COMP, UNIT> -where - DM: Mode, +impl crate::private::Sealed for Alarm<'_, T, DM, COMP, UNIT> where + DM: Mode { } -impl<'d, T, DM, COMP: Comparator, UNIT: Unit> super::Timer for Alarm<'d, T, DM, COMP, UNIT> +impl super::Timer for Alarm<'_, T, DM, COMP, UNIT> where DM: Mode, { @@ -996,7 +992,7 @@ where } } -impl<'d, T, DM, COMP: Comparator, UNIT: Unit> Peripheral for Alarm<'d, T, DM, COMP, UNIT> +impl Peripheral for Alarm<'_, T, DM, COMP, UNIT> where DM: Mode, { @@ -1063,7 +1059,7 @@ mod asynch { } } - impl<'a, COMP: Comparator, UNIT: Unit> core::future::Future for AlarmFuture<'a, COMP, UNIT> { + impl core::future::Future for AlarmFuture<'_, COMP, UNIT> { type Output = (); fn poll(self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll { @@ -1077,8 +1073,8 @@ mod asynch { } } - impl<'d, COMP: Comparator, UNIT: Unit> embedded_hal_async::delay::DelayNs - for Alarm<'d, Target, crate::Async, COMP, UNIT> + impl embedded_hal_async::delay::DelayNs + for Alarm<'_, Target, crate::Async, COMP, UNIT> { async fn delay_ns(&mut self, nanos: u32) { self.set_target( @@ -1180,13 +1176,13 @@ pub mod etm { } } - impl<'a, 'd, M, DM: crate::Mode, COMP: Comparator, UNIT: Unit> crate::private::Sealed - for SysTimerEtmEvent<'a, 'd, M, DM, COMP, UNIT> + impl crate::private::Sealed + for SysTimerEtmEvent<'_, '_, M, DM, COMP, UNIT> { } - impl<'a, 'd, M, DM: crate::Mode, COMP: Comparator, UNIT: Unit> crate::etm::EtmEvent - for SysTimerEtmEvent<'a, 'd, M, DM, COMP, UNIT> + impl crate::etm::EtmEvent + for SysTimerEtmEvent<'_, '_, M, DM, COMP, UNIT> { fn id(&self) -> u8 { 50 + self.alarm.comparator.channel() diff --git a/esp-hal/src/timer/timg.rs b/esp-hal/src/timer/timg.rs index 27818ed8f..1409e1620 100644 --- a/esp-hal/src/timer/timg.rs +++ b/esp-hal/src/timer/timg.rs @@ -1232,7 +1232,7 @@ mod asynch { } } - impl<'a, T> core::future::Future for TimerFuture<'a, T> + impl core::future::Future for TimerFuture<'_, T> where T: Instance, { @@ -1250,7 +1250,7 @@ mod asynch { } } - impl<'a, T> Drop for TimerFuture<'a, T> + impl Drop for TimerFuture<'_, T> where T: Instance, { diff --git a/esp-hal/src/twai/mod.rs b/esp-hal/src/twai/mod.rs index 705b7a60a..12f3ffd4e 100644 --- a/esp-hal/src/twai/mod.rs +++ b/esp-hal/src/twai/mod.rs @@ -1444,7 +1444,7 @@ unsafe fn copy_to_data_register(dest: *mut u32, src: &[u8]) { } } -impl<'d, DM, T> embedded_hal_02::can::Can for Twai<'d, DM, T> +impl embedded_hal_02::can::Can for Twai<'_, DM, T> where T: Instance, DM: crate::Mode, @@ -1468,7 +1468,7 @@ where } } -impl<'d, DM, T> embedded_can::nb::Can for Twai<'d, DM, T> +impl embedded_can::nb::Can for Twai<'_, DM, T> where T: Instance, DM: crate::Mode, diff --git a/esp-hal/src/usb_serial_jtag.rs b/esp-hal/src/usb_serial_jtag.rs index ea604f876..a2247baca 100644 --- a/esp-hal/src/usb_serial_jtag.rs +++ b/esp-hal/src/usb_serial_jtag.rs @@ -106,7 +106,7 @@ pub struct UsbSerialJtagRx<'d, M> { phantom: PhantomData<(&'d mut USB_DEVICE, M)>, } -impl<'d, M> UsbSerialJtagTx<'d, M> +impl UsbSerialJtagTx<'_, M> where M: Mode, { @@ -183,7 +183,7 @@ where } } -impl<'d, M> UsbSerialJtagRx<'d, M> +impl UsbSerialJtagRx<'_, M> where M: Mode, { @@ -265,9 +265,9 @@ impl<'d> UsbSerialJtag<'d, Blocking> { } } -impl<'d> crate::private::Sealed for UsbSerialJtag<'d, Blocking> {} +impl crate::private::Sealed for UsbSerialJtag<'_, Blocking> {} -impl<'d> InterruptConfigurable for UsbSerialJtag<'d, Blocking> { +impl InterruptConfigurable for UsbSerialJtag<'_, Blocking> { fn set_interrupt_handler(&mut self, handler: crate::interrupt::InterruptHandler) { self.inner_set_interrupt_handler(handler); } @@ -670,7 +670,7 @@ mod asynch { phantom: PhantomData<&'d mut USB_DEVICE>, } - impl<'d> UsbSerialJtagWriteFuture<'d> { + impl UsbSerialJtagWriteFuture<'_> { pub fn new() -> Self { // Set the interrupt enable bit for the USB_SERIAL_JTAG_SERIAL_IN_EMPTY_INT // interrupt @@ -692,7 +692,7 @@ mod asynch { } } - impl<'d> core::future::Future for UsbSerialJtagWriteFuture<'d> { + impl core::future::Future for UsbSerialJtagWriteFuture<'_> { type Output = (); fn poll( @@ -713,7 +713,7 @@ mod asynch { phantom: PhantomData<&'d mut USB_DEVICE>, } - impl<'d> UsbSerialJtagReadFuture<'d> { + impl UsbSerialJtagReadFuture<'_> { pub fn new() -> Self { // Set the interrupt enable bit for the USB_SERIAL_JTAG_SERIAL_OUT_RECV_PKT // interrupt @@ -735,7 +735,7 @@ mod asynch { } } - impl<'d> core::future::Future for UsbSerialJtagReadFuture<'d> { + impl core::future::Future for UsbSerialJtagReadFuture<'_> { type Output = (); fn poll( diff --git a/esp-ieee802154/src/lib.rs b/esp-ieee802154/src/lib.rs index 810056b22..4d0d43f9f 100644 --- a/esp-ieee802154/src/lib.rs +++ b/esp-ieee802154/src/lib.rs @@ -305,7 +305,7 @@ impl<'a> Ieee802154<'a> { } } -impl<'a> Drop for Ieee802154<'a> { +impl Drop for Ieee802154<'_> { fn drop(&mut self) { self.clear_tx_done_callback(); self.clear_tx_done_callback_fn(); diff --git a/esp-println/Cargo.toml b/esp-println/Cargo.toml index 75f7c09d5..06a0cba29 100644 --- a/esp-println/Cargo.toml +++ b/esp-println/Cargo.toml @@ -52,3 +52,6 @@ defmt-espflash = ["dep:defmt", "defmt?/encoding-rzcobs"] # logging sub-features colors = [] + +[lints.rust] +static_mut_refs = "allow" diff --git a/esp-wifi/src/ble/btdm.rs b/esp-wifi/src/ble/btdm.rs index ba84cf1a5..aa601f69d 100644 --- a/esp-wifi/src/ble/btdm.rs +++ b/esp-wifi/src/ble/btdm.rs @@ -368,6 +368,7 @@ pub(crate) fn ble_init() { unsafe { (*addr_of_mut!(HCI_OUT_COLLECTOR)).write(HciOutCollector::new()); // turn on logging + #[allow(static_mut_refs)] #[cfg(feature = "sys-logs")] { extern "C" { diff --git a/esp-wifi/src/ble/controller/mod.rs b/esp-wifi/src/ble/controller/mod.rs index 1d639b469..de26dfb51 100644 --- a/esp-wifi/src/ble/controller/mod.rs +++ b/esp-wifi/src/ble/controller/mod.rs @@ -211,7 +211,7 @@ pub mod asynch { } } - impl<'d> Transport for BleConnector<'d> { + impl Transport for BleConnector<'_> { /// Read a complete HCI packet into the rx buffer async fn read<'a>( &self, diff --git a/esp-wifi/src/ble/npl.rs b/esp-wifi/src/ble/npl.rs index a7d34884f..6b755ee68 100644 --- a/esp-wifi/src/ble/npl.rs +++ b/esp-wifi/src/ble/npl.rs @@ -1009,6 +1009,7 @@ pub(crate) fn ble_init() { (*addr_of_mut!(HCI_OUT_COLLECTOR)).write(HciOutCollector::new()); // turn on logging + #[allow(static_mut_refs)] #[cfg(all(feature = "sys-logs", esp32c2))] { extern "C" { diff --git a/esp-wifi/src/wifi/mod.rs b/esp-wifi/src/wifi/mod.rs index c307f6c61..3d92900e8 100644 --- a/esp-wifi/src/wifi/mod.rs +++ b/esp-wifi/src/wifi/mod.rs @@ -3271,7 +3271,7 @@ mod asynch { use super::*; // TODO assumes STA mode only - impl<'d> WifiController<'d> { + impl WifiController<'_> { /// Async version of [`crate::wifi::WifiController`]'s `scan_n` method pub async fn scan_n( &mut self, diff --git a/examples/src/bin/ram.rs b/examples/src/bin/ram.rs index c8c802fcc..70c14731a 100644 --- a/examples/src/bin/ram.rs +++ b/examples/src/bin/ram.rs @@ -13,6 +13,7 @@ //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 +#![allow(static_mut_refs)] #![no_std] #![no_main] diff --git a/examples/src/bin/wifi_coex.rs b/examples/src/bin/wifi_coex.rs index 02aa7c8f8..ad0e92e81 100644 --- a/examples/src/bin/wifi_coex.rs +++ b/examples/src/bin/wifi_coex.rs @@ -11,6 +11,7 @@ //% FEATURES: esp-wifi esp-wifi/wifi-default esp-wifi/wifi esp-wifi/utils esp-wifi/ble esp-wifi/coex //% CHIPS: esp32 esp32s3 esp32c2 esp32c3 esp32c6 +#![allow(static_mut_refs)] #![no_std] #![no_main] diff --git a/examples/src/bin/wifi_embassy_bench.rs b/examples/src/bin/wifi_embassy_bench.rs index 3214804fa..6659ed604 100644 --- a/examples/src/bin/wifi_embassy_bench.rs +++ b/examples/src/bin/wifi_embassy_bench.rs @@ -13,6 +13,7 @@ //% FEATURES: embassy embassy-generic-timers esp-wifi esp-wifi/async esp-wifi/embassy-net esp-wifi/wifi-default esp-wifi/wifi esp-wifi/utils //% CHIPS: esp32 esp32s2 esp32s3 esp32c3 esp32c6 +#![allow(static_mut_refs)] #![no_std] #![no_main]