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
This commit is contained in:
Jesse Braham 2024-11-01 03:31:56 -07:00 committed by GitHub
parent a5c4aa1cea
commit fc4eaa1ebf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
45 changed files with 233 additions and 234 deletions

View File

@ -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);

View File

@ -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<K>(&mut self, key: K)

View File

@ -530,8 +530,8 @@ impl super::AdcCalEfuse for crate::peripherals::ADC2 {
}
}
impl<'d, ADCI, PIN, CS> embedded_hal_02::adc::OneShot<ADCI, u16, super::AdcPin<PIN, ADCI, CS>>
for Adc<'d, ADCI>
impl<ADCI, PIN, CS> embedded_hal_02::adc::OneShot<ADCI, u16, super::AdcPin<PIN, ADCI, CS>>
for Adc<'_, ADCI>
where
PIN: embedded_hal_02::adc::Channel<ADCI, ID = u8> + super::AdcChannel,
ADCI: RegisterAccess,

View File

@ -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

View File

@ -157,7 +157,7 @@ where
}
}
impl<'d, MODE> DmaSupport for Mem2Mem<'d, MODE>
impl<MODE> DmaSupport for Mem2Mem<'_, MODE>
where
MODE: Mode,
{

View File

@ -1685,9 +1685,9 @@ where
}
}
impl<'a, CH> crate::private::Sealed for ChannelRx<'a, CH> where CH: DmaChannel {}
impl<CH> crate::private::Sealed for ChannelRx<'_, CH> where CH: DmaChannel {}
impl<'a, CH> Rx for ChannelRx<'a, CH>
impl<CH> 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<CH> crate::private::Sealed for ChannelTx<'_, CH> where CH: DmaChannel {}
impl<'a, CH> Tx for ChannelTx<'a, CH>
impl<CH> Tx for ChannelTx<'_, CH>
where
CH: DmaChannel,
{
@ -2113,7 +2113,7 @@ where
phantom: PhantomData<MODE>,
}
impl<'d, C> Channel<'d, C, crate::Blocking>
impl<C> Channel<'_, C, crate::Blocking>
where
C: DmaChannel,
{
@ -2272,7 +2272,7 @@ where
}
}
impl<'a, I> Drop for DmaTransferTx<'a, I>
impl<I> Drop for DmaTransferTx<'_, I>
where
I: dma_private::DmaSupportTx,
{
@ -2325,7 +2325,7 @@ where
}
}
impl<'a, I> Drop for DmaTransferRx<'a, I>
impl<I> Drop for DmaTransferRx<'_, I>
where
I: dma_private::DmaSupportRx,
{
@ -2384,7 +2384,7 @@ where
}
}
impl<'a, I> Drop for DmaTransferRxTx<'a, I>
impl<I> 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<I> Drop for DmaTransferTxCircular<'_, I>
where
I: dma_private::DmaSupportTx,
{
@ -2514,7 +2514,7 @@ where
}
}
impl<'a, I> Drop for DmaTransferRxCircular<'a, I>
impl<I> 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<TX> 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<TX> 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<RX> 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<RX> 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<TX> 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<TX> 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<RX> 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<RX> Drop for DmaRxDoneChFuture<'_, RX>
where
RX: Rx,
{

View File

@ -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<DM: crate::Mode> Ecc<'_, DM> {
/// Resets the ECC peripheral.
pub fn reset(&mut self) {
self.ecc.mult_conf().reset()

View File

@ -123,7 +123,7 @@ where
_task: &'a T,
}
impl<'a, E, T, const C: u8> Drop for EtmConfiguredChannel<'a, E, T, C>
impl<E, T, const C: u8> Drop for EtmConfiguredChannel<'_, E, T, C>
where
E: EtmEvent,
T: EtmTask,

View File

@ -202,12 +202,12 @@ where
_pin: PeripheralRef<'d, PIN>,
}
impl<'d, PIN, const C: u8> private::Sealed for GpioEtmEventChannelRising<'d, PIN, C> where
impl<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> 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<PIN, const C: u8> crate::etm::EtmTask for GpioEtmTaskToggle<'_, PIN, C>
where
PIN: super::Pin,
{

View File

@ -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<P> private::Sealed for Output<'_, P> {}
impl<'d, P> Peripheral for Output<'d, P> {
impl<P> 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<P> private::Sealed for Input<'_, P> {}
impl<'d, P> Peripheral for Input<'d, P> {
impl<P> 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<P> private::Sealed for OutputOpenDrain<'_, P> {}
impl<'d, P> Peripheral for OutputOpenDrain<'d, P> {
impl<P> 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<P> private::Sealed for Flex<'_, P> {}
impl<'d, P> Peripheral for Flex<'d, P> {
impl<P> 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<P> Flex<'_, P>
where
P: InputPin,
{
@ -1589,7 +1588,7 @@ where
}
}
impl<'d, P> Flex<'d, P>
impl<P> Flex<'_, P>
where
P: OutputPin,
{
@ -1658,7 +1657,7 @@ where
}
}
impl<'d, P> Flex<'d, P>
impl<P> 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<P> Flex<'_, P>
where
P: InputPin,
{
@ -1880,7 +1879,7 @@ mod asynch {
}
}
impl<'d, P> Input<'d, P>
impl<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> 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<P> digital::ErrorType for Input<'_, P>
where
P: InputPin,
{
type Error = core::convert::Infallible;
}
impl<'d, P> digital::InputPin for Input<'d, P>
impl<P> 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<P> digital::ErrorType for Output<'_, P>
where
P: OutputPin,
{
type Error = core::convert::Infallible;
}
impl<'d, P> digital::OutputPin for Output<'d, P>
impl<P> 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<P> 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<P> 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<P> digital::ErrorType for OutputOpenDrain<'_, P>
where
P: InputPin + OutputPin,
{
type Error = core::convert::Infallible;
}
impl<'d, P> digital::OutputPin for OutputOpenDrain<'d, P>
impl<P> 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<P> 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<P> 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<P> digital::ErrorType for Flex<'_, P> {
type Error = core::convert::Infallible;
}
impl<'d, P> digital::OutputPin for Flex<'d, P>
impl<P> 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<P> 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<P> 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<P> Wait for Input<'_, P>
where
P: InputPin,
{

View File

@ -587,9 +587,9 @@ where
}
}
impl<'d, T> crate::private::Sealed for I2c<'d, Blocking, T> where T: Instance {}
impl<T> crate::private::Sealed for I2c<'_, Blocking, T> where T: Instance {}
impl<'d, T> InterruptConfigurable for I2c<'d, Blocking, T>
impl<T> 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<T> 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<T> embedded_hal_async::i2c::I2c for I2c<'_, Async, T>
where
T: Instance,
{

View File

@ -314,7 +314,7 @@ where
}
}
impl<'d, DmaMode, T> I2s<'d, DmaMode, T>
impl<DmaMode, T> 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<DmaMode, I> crate::private::Sealed for I2s<'_, DmaMode, I>
where
I: RegisterAccess,
DmaMode: Mode,
{
}
impl<'d, DmaMode, I> InterruptConfigurable for I2s<'d, DmaMode, I>
impl<DmaMode, I> InterruptConfigurable for I2s<'_, DmaMode, I>
where
I: RegisterAccess,
DmaMode: Mode,
@ -453,7 +453,7 @@ where
phantom: PhantomData<DmaMode>,
}
impl<'d, DmaMode, T> core::fmt::Debug for I2sTx<'d, DmaMode, T>
impl<DmaMode, T> 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<DmaMode, T> DmaSupport for I2sTx<'_, DmaMode, T>
where
T: RegisterAccess,
DmaMode: Mode,
@ -493,7 +493,7 @@ where
}
}
impl<'d, DmaMode, T> I2sTx<'d, DmaMode, T>
impl<DmaMode, T> I2sTx<'_, DmaMode, T>
where
T: RegisterAccess,
DmaMode: Mode,
@ -586,7 +586,7 @@ where
phantom: PhantomData<DmaMode>,
}
impl<'d, DmaMode, T> core::fmt::Debug for I2sRx<'d, DmaMode, T>
impl<DmaMode, T> 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<DmaMode, T> DmaSupport for I2sRx<'_, DmaMode, T>
where
T: RegisterAccess,
DmaMode: Mode,
@ -626,7 +626,7 @@ where
}
}
impl<'d, DmaMode, T> I2sRx<'d, DmaMode, T>
impl<DmaMode, T> 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<T, BUFFER> I2sWriteDmaTransferAsync<'_, BUFFER, T>
where
T: RegisterAccess,
{
@ -2064,7 +2064,7 @@ pub mod asynch {
_buffer: BUFFER,
}
impl<'d, T, BUFFER> I2sReadDmaTransferAsync<'d, BUFFER, T>
impl<T, BUFFER> I2sReadDmaTransferAsync<'_, BUFFER, T>
where
T: RegisterAccess,
{

View File

@ -312,7 +312,7 @@ mod ehal1 {
}
}
impl<'a, S: TimerSpeed> ErrorType for Channel<'a, S> {
impl<S: TimerSpeed> ErrorType for Channel<'_, S> {
type Error = Error;
}
@ -343,7 +343,7 @@ mod ehal1 {
}
}
impl<'a, S: crate::ledc::timer::TimerSpeed> Channel<'a, S> {
impl<S: crate::ledc::timer::TimerSpeed> 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<S> ChannelHW for Channel<'_, S>
where
S: crate::ledc::timer::TimerSpeed,
{

View File

@ -306,7 +306,7 @@ impl<'a, S: TimerSpeed> Timer<'a, S> {
}
/// Timer HW implementation for LowSpeed timers
impl<'a> TimerHW<LowSpeed> for Timer<'a, LowSpeed> {
impl TimerHW<LowSpeed> for Timer<'_, LowSpeed> {
/// Get the current source timer frequency from the HW
fn get_freq_hw(&self) -> Option<HertzU32> {
self.clock_source.map(|source| match source {

View File

@ -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<PWM: PwmPeripheral, const OP: u8, const IS_A: bool> 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<PWM: PwmPeripheral, const OP: u8, const IS_A: bool> 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<PWM: PwmPeripheral, const OP: u8, const IS_A: bool> embedded_hal::pwm::SetDutyCycle
for PwmPin<'_, PWM, OP, IS_A>
{
/// Get the max duty of the PwmPin
fn max_duty_cycle(&self) -> u16 {

View File

@ -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<P> TxPins for TxPinConfigWithValidPin<'_, P> where
P: NotContainsValidSignalPin + TxPins + ConfigurePins
{
}
impl<'d, P> ConfigurePins for TxPinConfigWithValidPin<'d, P>
impl<P> ConfigurePins for TxPinConfigWithValidPin<'_, P>
where
P: NotContainsValidSignalPin + TxPins + ConfigurePins,
{
@ -570,12 +570,12 @@ where
}
}
impl<'d, P> RxPins for RxPinConfigWithValidPin<'d, P> where
impl<P> RxPins for RxPinConfigWithValidPin<'_, P> where
P: NotContainsValidSignalPin + RxPins + ConfigurePins
{
}
impl<'d, P> ConfigurePins for RxPinConfigWithValidPin<'d, P>
impl<P> ConfigurePins for RxPinConfigWithValidPin<'_, P>
where
P: NotContainsValidSignalPin + RxPins + ConfigurePins,
{
@ -832,7 +832,7 @@ where
phantom: PhantomData<DM>,
}
impl<'d, DM> core::fmt::Debug for ParlIoTx<'d, DM>
impl<DM> core::fmt::Debug for ParlIoTx<'_, DM>
where
DM: Mode,
{
@ -911,7 +911,7 @@ where
phantom: PhantomData<DM>,
}
impl<'d, DM> core::fmt::Debug for ParlIoRx<'d, DM>
impl<DM> 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<DM> ParlIoTx<'_, DM>
where
DM: Mode,
{
@ -1316,7 +1316,7 @@ where
}
}
impl<'d, DM> DmaSupport for ParlIoTx<'d, DM>
impl<DM> DmaSupport for ParlIoTx<'_, DM>
where
DM: Mode,
{
@ -1405,7 +1405,7 @@ where
}
}
impl<'d, DM> DmaSupport for ParlIoRx<'d, DM>
impl<DM> 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<TXBUF>(&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.

View File

@ -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<const UNIT: usize, const NUM: usize> Channel<'_, UNIT, NUM> {
/// return a new Channel
pub(super) fn new() -> Self {
Self {

View File

@ -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());

View File

@ -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<const NUM: usize> 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<const NUM: usize> 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<const NUM: usize> 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<const NUM: usize> Counter<'_, NUM> {
fn new() -> Self {
Self {
_phantom: PhantomData,

View File

@ -82,7 +82,7 @@ impl<'a, T> PeripheralRef<'a, T> {
}
}
impl<'a, T> Deref for PeripheralRef<'a, T> {
impl<T> 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<T> DerefMut for PeripheralRef<'_, T> {
#[inline]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.inner

View File

@ -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<u32> + Copy> SingleShotTxTransaction<'a, C, T>
impl<C, T: Into<u32> + Copy> SingleShotTxTransaction<'_, C, T>
where
C: TxChannel,
{
@ -1045,7 +1045,7 @@ where
data: &'a mut [T],
}
impl<'a, C, T: From<u32> + Copy> RxTransaction<'a, C, T>
impl<C, T: From<u32> + 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<u32> + Copy>(&mut self, data: &'a [T]) -> Result<(), Error>
async fn transmit<T: Into<u32> + 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<u32> + Copy>(&mut self, data: &'a mut [T]) -> Result<(), Error>
async fn receive<T: From<u32> + Copy>(&mut self, data: &mut [T]) -> Result<(), Error>
where
Self: Sized,
{

View File

@ -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();
}

View File

@ -10,7 +10,7 @@ use crate::rsa::{
RsaMultiplication,
};
impl<'d, DM: crate::Mode> Rsa<'d, DM> {
impl<DM: crate::Mode> 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<InputType = [u32; N]>,
{
@ -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<InputType = [u32; N]>,
{
@ -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<InputType = [u32; N]>,
{

View File

@ -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<T: RsaMode, const N: usize> RsaModularExponentiation<'_, '_, T, Async>
where
T: RsaMode<InputType = [u32; N]>,
{
@ -454,7 +454,7 @@ pub(crate) mod asynch {
}
}
impl<'a, 'd, T: RsaMode, const N: usize> RsaModularMultiplication<'a, 'd, T, Async>
impl<T: RsaMode, const N: usize> RsaModularMultiplication<'_, '_, T, Async>
where
T: RsaMode<InputType = [u32; N]>,
{
@ -483,12 +483,12 @@ pub(crate) mod asynch {
}
}
impl<'a, 'd, T: RsaMode + Multi, const N: usize> RsaMultiplication<'a, 'd, T, Async>
impl<T: RsaMode + Multi, const N: usize> RsaMultiplication<'_, '_, T, Async>
where
T: RsaMode<InputType = [u32; N]>,
{
/// Asynchronously performs an RSA multiplication operation.
pub async fn multiplication<'b, const O: usize>(
pub async fn multiplication<const O: usize>(
&mut self,
operand_b: &T::InputType,
outbuf: &mut T::OutputType,

View File

@ -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(

View File

@ -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 {

View File

@ -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 {

View File

@ -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());

View File

@ -448,7 +448,7 @@ where
}
}
impl<'d, T> Spi<'d, T>
impl<T> Spi<'_, T>
where
T: Instance,
{
@ -845,7 +845,7 @@ mod dma {
{
}
impl<'d, M, T> core::fmt::Debug for SpiDma<'d, M, T>
impl<M, T> 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<T> InterruptConfigurable for SpiDma<'_, Blocking, T>
where
T: InstanceDma,
{
@ -874,7 +874,7 @@ mod dma {
}
#[cfg(gdma)]
impl<'d, T> SpiDma<'d, Blocking, T>
impl<T> 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<M, T> 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<M, T, Buf> 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<T, Buf> SpiDmaTransfer<'_, crate::Async, Buf, T>
where
T: InstanceDma,
{
@ -1485,7 +1485,7 @@ mod dma {
}
}
impl<'d, T> InterruptConfigurable for SpiDmaBus<'d, Blocking, T>
impl<T> InterruptConfigurable for SpiDmaBus<'_, Blocking, T>
where
T: InstanceDma,
{
@ -1498,7 +1498,7 @@ mod dma {
}
#[cfg(gdma)]
impl<'d, T> SpiDmaBus<'d, Blocking, T>
impl<T> 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<M, T> crate::private::Sealed for SpiDmaBus<'_, M, T>
where
T: InstanceDma,
M: Mode,
{
}
impl<'d, M, T> SpiDmaBus<'d, M, T>
impl<M, T> SpiDmaBus<'_, M, T>
where
T: InstanceDma,
M: Mode,
@ -1630,7 +1630,7 @@ mod dma {
}
}
impl<'d, M, T> SpiDmaBus<'d, M, T>
impl<M, T> SpiDmaBus<'_, M, T>
where
T: InstanceDma,
M: Mode,
@ -1699,7 +1699,7 @@ mod dma {
}
}
impl<'d, T> embedded_hal_02::blocking::spi::Transfer<u8> for SpiDmaBus<'d, crate::Blocking, T>
impl<T> embedded_hal_02::blocking::spi::Transfer<u8> for SpiDmaBus<'_, crate::Blocking, T>
where
T: InstanceDma,
{
@ -1711,7 +1711,7 @@ mod dma {
}
}
impl<'d, T> embedded_hal_02::blocking::spi::Write<u8> for SpiDmaBus<'d, crate::Blocking, T>
impl<T> embedded_hal_02::blocking::spi::Write<u8> for SpiDmaBus<'_, crate::Blocking, T>
where
T: InstanceDma,
{
@ -1770,7 +1770,7 @@ mod dma {
}
}
impl<'d, T> SpiDmaBus<'d, crate::Async, T>
impl<T> 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<T> 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<M, T> 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<M, T> SpiBus for SpiDmaBus<'_, M, T>
where
T: InstanceDma,
M: Mode,

View File

@ -227,7 +227,7 @@ pub mod dma {
tx_chain: DescriptorChain,
}
impl<'d, DmaMode, T> core::fmt::Debug for SpiDma<'d, DmaMode, T>
impl<DmaMode, T> 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<DmaMode, T> DmaSupport for SpiDma<'_, DmaMode, T>
where
T: InstanceDma,
DmaMode: Mode,

View File

@ -248,7 +248,7 @@ pub(crate) fn lock<T>(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) };
}

View File

@ -201,9 +201,9 @@ where
}
}
impl<'d, T> crate::private::Sealed for OneShotTimer<'d, T> where T: Timer {}
impl<T> crate::private::Sealed for OneShotTimer<'_, T> where T: Timer {}
impl<'d, T> InterruptConfigurable for OneShotTimer<'d, T>
impl<T> InterruptConfigurable for OneShotTimer<'_, T>
where
T: Timer,
{
@ -212,7 +212,7 @@ where
}
}
impl<'d, T, UXX> embedded_hal_02::blocking::delay::DelayMs<UXX> for OneShotTimer<'d, T>
impl<T, UXX> embedded_hal_02::blocking::delay::DelayMs<UXX> for OneShotTimer<'_, T>
where
T: Timer,
UXX: Into<u32>,
@ -222,7 +222,7 @@ where
}
}
impl<'d, T, UXX> embedded_hal_02::blocking::delay::DelayUs<UXX> for OneShotTimer<'d, T>
impl<T, UXX> embedded_hal_02::blocking::delay::DelayUs<UXX> for OneShotTimer<'_, T>
where
T: Timer,
UXX: Into<u32>,
@ -232,7 +232,7 @@ where
}
}
impl<'d, T> embedded_hal::delay::DelayNs for OneShotTimer<'d, T>
impl<T> 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<T> crate::private::Sealed for PeriodicTimer<'_, T> where T: Timer {}
impl<'d, T> InterruptConfigurable for PeriodicTimer<'d, T>
impl<T> 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<T> 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<T> 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<T> embedded_hal_02::timer::Periodic for PeriodicTimer<'_, T> where T: Timer {}
/// An enum of all timer types
enum AnyTimerInner {

View File

@ -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<const CHANNEL: u8> SpecificUnit<'_, CHANNEL> {
fn new() -> Self {
Self(PhantomData)
}
}
impl<'d, const CHANNEL: u8> Unit for SpecificUnit<'d, CHANNEL> {
impl<const CHANNEL: u8> 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<const CHANNEL: u8> SpecificComparator<'_, CHANNEL> {
fn new() -> Self {
Self(PhantomData)
}
}
impl<'d, const CHANNEL: u8> Comparator for SpecificComparator<'d, CHANNEL> {
impl<const CHANNEL: u8> 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<T, DM, COMP: Comparator, UNIT: Unit> 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<T, COMP: Comparator, UNIT: Unit> 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<T, DM, COMP: Comparator, UNIT: Unit> 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<T, DM, COMP: Comparator, UNIT: Unit> 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<T, DM, COMP: Comparator, UNIT: Unit> 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<COMP: Comparator, UNIT: Unit> core::future::Future for AlarmFuture<'_, COMP, UNIT> {
type Output = ();
fn poll(self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::Output> {
@ -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<COMP: Comparator, UNIT: Unit> 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<M, DM: crate::Mode, COMP: Comparator, UNIT: Unit> 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<M, DM: crate::Mode, COMP: Comparator, UNIT: Unit> crate::etm::EtmEvent
for SysTimerEtmEvent<'_, '_, M, DM, COMP, UNIT>
{
fn id(&self) -> u8 {
50 + self.alarm.comparator.channel()

View File

@ -1232,7 +1232,7 @@ mod asynch {
}
}
impl<'a, T> core::future::Future for TimerFuture<'a, T>
impl<T> core::future::Future for TimerFuture<'_, T>
where
T: Instance,
{
@ -1250,7 +1250,7 @@ mod asynch {
}
}
impl<'a, T> Drop for TimerFuture<'a, T>
impl<T> Drop for TimerFuture<'_, T>
where
T: Instance,
{

View File

@ -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<DM, T> 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<DM, T> embedded_can::nb::Can for Twai<'_, DM, T>
where
T: Instance,
DM: crate::Mode,

View File

@ -106,7 +106,7 @@ pub struct UsbSerialJtagRx<'d, M> {
phantom: PhantomData<(&'d mut USB_DEVICE, M)>,
}
impl<'d, M> UsbSerialJtagTx<'d, M>
impl<M> UsbSerialJtagTx<'_, M>
where
M: Mode,
{
@ -183,7 +183,7 @@ where
}
}
impl<'d, M> UsbSerialJtagRx<'d, M>
impl<M> 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(

View File

@ -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();

View File

@ -52,3 +52,6 @@ defmt-espflash = ["dep:defmt", "defmt?/encoding-rzcobs"]
# logging sub-features
colors = []
[lints.rust]
static_mut_refs = "allow"

View File

@ -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" {

View File

@ -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,

View File

@ -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" {

View File

@ -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<const N: usize>(
&mut self,

View File

@ -13,6 +13,7 @@
//% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3
#![allow(static_mut_refs)]
#![no_std]
#![no_main]

View File

@ -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]

View File

@ -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]