diff --git a/src/adc.rs b/src/adc.rs index 06f9a70e6..c5f9c068a 100644 --- a/src/adc.rs +++ b/src/adc.rs @@ -150,8 +150,8 @@ mod oneshot_legacy { } } - impl<'d, const A: adc_atten_t, T: ADCPin> embedded_hal_0_2::adc::Channel - for AdcChannelDriver<'d, A, T> + impl embedded_hal_0_2::adc::Channel + for AdcChannelDriver<'_, A, T> { type ID = (adc_channel_t, adc_atten_t); @@ -173,7 +173,7 @@ mod oneshot_legacy { >, } - unsafe impl<'d, ADC: Adc> Send for AdcDriver<'d, ADC> {} + unsafe impl Send for AdcDriver<'_, ADC> {} impl<'d, ADC: Adc> AdcDriver<'d, ADC> { #[cfg(all( @@ -404,9 +404,9 @@ mod oneshot_legacy { } } - impl<'d, 'c, const A: adc_atten_t, T> + impl<'c, const A: adc_atten_t, T> embedded_hal_0_2::adc::OneShot> - for AdcDriver<'d, T::Adc> + for AdcDriver<'_, T::Adc> where T: ADCPin, { @@ -797,7 +797,7 @@ pub mod oneshot { } } - impl<'d, ADC: Adc> Drop for AdcDriver<'d, ADC> { + impl Drop for AdcDriver<'_, ADC> { fn drop(&mut self) { unsafe { esp!(adc_oneshot_del_unit(self.handle)) }.unwrap(); } @@ -816,8 +816,8 @@ pub mod oneshot { } } - unsafe impl<'d, ADC: Adc> Send for AdcDriver<'d, ADC> {} - unsafe impl<'d, ADC: Adc> Sync for AdcDriver<'d, ADC> {} + unsafe impl Send for AdcDriver<'_, ADC> {} + unsafe impl Sync for AdcDriver<'_, ADC> {} } /// Continuous ADC module @@ -923,10 +923,10 @@ pub mod continuous { fn iter(&self) -> Self::Iterator<'_>; } - impl<'d, P> AdcChannels for P + impl

AdcChannels for P where P: Peripheral, - P::P: ADCPin + 'd, + P::P: ADCPin, { type Adc = <

::P as ADCPin>::Adc; @@ -940,9 +940,9 @@ pub mod continuous { } } - impl<'d, const A: adc_atten_t, C> AdcChannels for Attenuated + impl AdcChannels for Attenuated where - C: AdcChannels + 'd, + C: AdcChannels, { type Adc = C::Adc; @@ -1417,7 +1417,7 @@ pub mod continuous { } } - impl<'d> Drop for AdcDriver<'d> { + impl Drop for AdcDriver<'_> { fn drop(&mut self) { let _ = self.stop(); @@ -1440,13 +1440,13 @@ pub mod continuous { } } - unsafe impl<'d> Send for AdcDriver<'d> {} + unsafe impl Send for AdcDriver<'_> {} - impl<'d> embedded_io::ErrorType for AdcDriver<'d> { + impl embedded_io::ErrorType for AdcDriver<'_> { type Error = EspIOError; } - impl<'d> embedded_io::Read for AdcDriver<'d> { + impl embedded_io::Read for AdcDriver<'_> { fn read(&mut self, buf: &mut [u8]) -> Result { self.read_bytes(buf, delay::BLOCK).map_err(EspIOError) } diff --git a/src/can.rs b/src/can.rs index a9cd2546f..fc13c6b56 100644 --- a/src/can.rs +++ b/src/can.rs @@ -463,16 +463,16 @@ impl<'d> CanDriver<'d> { } } -impl<'d> Drop for CanDriver<'d> { +impl Drop for CanDriver<'_> { fn drop(&mut self) { let _ = self.stop(); esp!(unsafe { twai_driver_uninstall() }).unwrap(); } } -unsafe impl<'d> Send for CanDriver<'d> {} +unsafe impl Send for CanDriver<'_> {} -impl<'d> embedded_hal_0_2::blocking::can::Can for CanDriver<'d> { +impl embedded_hal_0_2::blocking::can::Can for CanDriver<'_> { type Frame = Frame; type Error = Can02Error; @@ -485,7 +485,7 @@ impl<'d> embedded_hal_0_2::blocking::can::Can for CanDriver<'d> { } } -impl<'d> embedded_can::blocking::Can for CanDriver<'d> { +impl embedded_can::blocking::Can for CanDriver<'_> { type Frame = Frame; type Error = CanError; @@ -498,7 +498,7 @@ impl<'d> embedded_can::blocking::Can for CanDriver<'d> { } } -impl<'d> embedded_hal_0_2::can::nb::Can for CanDriver<'d> { +impl embedded_hal_0_2::can::nb::Can for CanDriver<'_> { type Frame = Frame; type Error = Can02Error; @@ -520,7 +520,7 @@ impl<'d> embedded_hal_0_2::can::nb::Can for CanDriver<'d> { } } -impl<'d> embedded_can::nb::Can for CanDriver<'d> { +impl embedded_can::nb::Can for CanDriver<'_> { type Frame = Frame; type Error = CanError; diff --git a/src/gpio.rs b/src/gpio.rs index d5a45fd3d..e2e34bcf0 100644 --- a/src/gpio.rs +++ b/src/gpio.rs @@ -1224,15 +1224,15 @@ impl PinDriver<'_, T, MODE> { } } -impl<'d, T: Pin, MODE> Drop for PinDriver<'d, T, MODE> { +impl Drop for PinDriver<'_, T, MODE> { fn drop(&mut self) { gpio_reset_without_pull(self.pin.pin()).unwrap(); } } -unsafe impl<'d, T: Pin, MODE> Send for PinDriver<'d, T, MODE> {} +unsafe impl Send for PinDriver<'_, T, MODE> {} -impl<'d, T: Pin, MODE> embedded_hal_0_2::digital::v2::InputPin for PinDriver<'d, T, MODE> +impl embedded_hal_0_2::digital::v2::InputPin for PinDriver<'_, T, MODE> where MODE: InputMode, { @@ -1258,11 +1258,11 @@ fn to_gpio_err(err: EspError) -> GpioError { GpioError::other(err) } -impl<'d, T: Pin, MODE> embedded_hal::digital::ErrorType for PinDriver<'d, T, MODE> { +impl embedded_hal::digital::ErrorType for PinDriver<'_, T, MODE> { type Error = GpioError; } -impl<'d, T: Pin, MODE> embedded_hal::digital::InputPin for PinDriver<'d, T, MODE> +impl embedded_hal::digital::InputPin for PinDriver<'_, T, MODE> where MODE: InputMode, { @@ -1275,7 +1275,7 @@ where } } -impl<'d, T: Pin, MODE> embedded_hal::digital::InputPin for &PinDriver<'d, T, MODE> +impl embedded_hal::digital::InputPin for &PinDriver<'_, T, MODE> where MODE: InputMode, { @@ -1288,7 +1288,7 @@ where } } -impl<'d, T: Pin, MODE> embedded_hal_0_2::digital::v2::OutputPin for PinDriver<'d, T, MODE> +impl embedded_hal_0_2::digital::v2::OutputPin for PinDriver<'_, T, MODE> where MODE: OutputMode, { @@ -1303,7 +1303,7 @@ where } } -impl<'d, T: Pin, MODE> embedded_hal::digital::OutputPin for PinDriver<'d, T, MODE> +impl embedded_hal::digital::OutputPin for PinDriver<'_, T, MODE> where MODE: OutputMode, { @@ -1316,7 +1316,7 @@ where } } -impl<'d, T: Pin, MODE> embedded_hal::digital::StatefulOutputPin for PinDriver<'d, T, MODE> +impl embedded_hal::digital::StatefulOutputPin for PinDriver<'_, T, MODE> where MODE: OutputMode, { @@ -1343,7 +1343,7 @@ where // } // } -impl<'d, T: Pin, MODE> embedded_hal_0_2::digital::v2::StatefulOutputPin for PinDriver<'d, T, MODE> +impl embedded_hal_0_2::digital::v2::StatefulOutputPin for PinDriver<'_, T, MODE> where MODE: OutputMode, { @@ -1356,7 +1356,7 @@ where } } -impl<'d, T: Pin, MODE> embedded_hal_0_2::digital::v2::ToggleableOutputPin for PinDriver<'d, T, MODE> +impl embedded_hal_0_2::digital::v2::ToggleableOutputPin for PinDriver<'_, T, MODE> where MODE: OutputMode, { diff --git a/src/i2c.rs b/src/i2c.rs index 7f59abd65..c7c208e66 100644 --- a/src/i2c.rs +++ b/src/i2c.rs @@ -384,15 +384,15 @@ impl<'d> I2cDriver<'d> { } } -impl<'d> Drop for I2cDriver<'d> { +impl Drop for I2cDriver<'_> { fn drop(&mut self) { esp!(unsafe { i2c_driver_delete(self.port()) }).unwrap(); } } -unsafe impl<'d> Send for I2cDriver<'d> {} +unsafe impl Send for I2cDriver<'_> {} -impl<'d> embedded_hal_0_2::blocking::i2c::Read for I2cDriver<'d> { +impl embedded_hal_0_2::blocking::i2c::Read for I2cDriver<'_> { type Error = I2cError; fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { @@ -400,7 +400,7 @@ impl<'d> embedded_hal_0_2::blocking::i2c::Read for I2cDriver<'d> { } } -impl<'d> embedded_hal_0_2::blocking::i2c::Write for I2cDriver<'d> { +impl embedded_hal_0_2::blocking::i2c::Write for I2cDriver<'_> { type Error = I2cError; fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error> { @@ -408,7 +408,7 @@ impl<'d> embedded_hal_0_2::blocking::i2c::Write for I2cDriver<'d> { } } -impl<'d> embedded_hal_0_2::blocking::i2c::WriteRead for I2cDriver<'d> { +impl embedded_hal_0_2::blocking::i2c::WriteRead for I2cDriver<'_> { type Error = I2cError; fn write_read(&mut self, addr: u8, bytes: &[u8], buffer: &mut [u8]) -> Result<(), Self::Error> { @@ -416,11 +416,11 @@ impl<'d> embedded_hal_0_2::blocking::i2c::WriteRead for I2cDriver<'d> { } } -impl<'d> embedded_hal::i2c::ErrorType for I2cDriver<'d> { +impl embedded_hal::i2c::ErrorType for I2cDriver<'_> { type Error = I2cError; } -impl<'d> embedded_hal::i2c::I2c for I2cDriver<'d> { +impl embedded_hal::i2c::I2c for I2cDriver<'_> { fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { I2cDriver::read(self, addr, buffer, BLOCK).map_err(to_i2c_err) } @@ -457,7 +457,7 @@ pub struct I2cSlaveDriver<'d> { } #[cfg(not(esp32c2))] -unsafe impl<'d> Send for I2cSlaveDriver<'d> {} +unsafe impl Send for I2cSlaveDriver<'_> {} #[cfg(not(esp32c2))] impl<'d> I2cSlaveDriver<'d> { @@ -534,7 +534,7 @@ impl<'d> I2cSlaveDriver<'d> { } #[cfg(not(esp32c2))] -impl<'d> Drop for I2cSlaveDriver<'d> { +impl Drop for I2cSlaveDriver<'_> { fn drop(&mut self) { esp!(unsafe { i2c_driver_delete(self.port()) }).unwrap(); } @@ -582,7 +582,7 @@ impl<'buffers> CommandLink<'buffers> { } } -impl<'buffers> Drop for CommandLink<'buffers> { +impl Drop for CommandLink<'_> { fn drop(&mut self) { unsafe { i2c_cmd_link_delete(self.0); diff --git a/src/i2s.rs b/src/i2s.rs index dc22e059f..fc81347b5 100644 --- a/src/i2s.rs +++ b/src/i2s.rs @@ -593,7 +593,7 @@ impl<'d, Dir> Deref for I2sDriverRef<'d, Dir> { } } -impl<'d, Dir> DerefMut for I2sDriverRef<'d, Dir> { +impl

DerefMut for I2sDriverRef<'_, Dir> { fn deref_mut(&mut self) -> &mut Self::Target { unsafe { self.0.as_mut() } } @@ -619,7 +619,7 @@ pub struct I2sDriver<'d, Dir> { _dir: PhantomData, } -impl<'d, Dir> I2sDriver<'d, Dir> { +impl I2sDriver<'_, Dir> { /// Create a new standard mode driver for the given I2S peripheral with both the receive and transmit channels open. #[cfg(not(esp_idf_version_major = "4"))] fn internal_new( @@ -1215,7 +1215,7 @@ where } } -impl<'d> I2sDriver<'d, I2sBiDir> { +impl I2sDriver<'_, I2sBiDir> { /// Split the bidirectional I2S driver into two parts (Rx, Tx) /// /// # Safety @@ -1230,7 +1230,7 @@ impl<'d> I2sDriver<'d, I2sBiDir> { } } -impl<'d, Dir> Drop for I2sDriver<'d, Dir> { +impl Drop for I2sDriver<'_, Dir> { fn drop(&mut self) { #[cfg(esp_idf_version_major = "4")] { @@ -1266,19 +1266,19 @@ impl<'d, Dir> Drop for I2sDriver<'d, Dir> { } } -unsafe impl<'d, Dir> Send for I2sDriver<'d, Dir> {} +unsafe impl Send for I2sDriver<'_, Dir> {} -impl<'d, Dir> I2sPort for I2sDriver<'d, Dir> { +impl I2sPort for I2sDriver<'_, Dir> { fn port(&self) -> i2s_port_t { self.port as _ } } -impl<'d, Dir> embedded_io::ErrorType for I2sDriver<'d, Dir> { +impl embedded_io::ErrorType for I2sDriver<'_, Dir> { type Error = EspIOError; } -impl<'d, Dir> embedded_io::Read for I2sDriver<'d, Dir> +impl embedded_io::Read for I2sDriver<'_, Dir> where Dir: I2sRxSupported, { @@ -1287,7 +1287,7 @@ where } } -impl<'d, Dir> embedded_io::Write for I2sDriver<'d, Dir> +impl embedded_io::Write for I2sDriver<'_, Dir> where Dir: I2sTxSupported, { diff --git a/src/interrupt.rs b/src/interrupt.rs index f8e5bac41..cf3d1455d 100644 --- a/src/interrupt.rs +++ b/src/interrupt.rs @@ -262,7 +262,7 @@ unsafe impl Sync for IsrCriticalSection {} pub struct IsrCriticalSectionGuard<'a>(&'a IsrCriticalSection); -impl<'a> Drop for IsrCriticalSectionGuard<'a> { +impl Drop for IsrCriticalSectionGuard<'_> { /// Drops the critical section guard thus potentially re-enabling /// al interrupts for the currently active core. /// diff --git a/src/ledc.rs b/src/ledc.rs index 1e6c90335..41fdc69ae 100644 --- a/src/ledc.rs +++ b/src/ledc.rs @@ -171,7 +171,7 @@ where } } -impl<'d, T> Drop for LedcTimerDriver<'d, T> +impl Drop for LedcTimerDriver<'_, T> where T: LedcTimer, { @@ -180,7 +180,7 @@ where } } -unsafe impl<'d, T> Send for LedcTimerDriver<'d, T> where T: LedcTimer {} +unsafe impl Send for LedcTimerDriver<'_, T> where T: LedcTimer {} /// LED Control driver pub struct LedcDriver<'d> { @@ -325,15 +325,15 @@ impl<'d> LedcDriver<'d> { } } -impl<'d> Drop for LedcDriver<'d> { +impl Drop for LedcDriver<'_> { fn drop(&mut self) { self.stop().unwrap(); } } -unsafe impl<'d> Send for LedcDriver<'d> {} +unsafe impl Send for LedcDriver<'_> {} -impl<'d> embedded_hal::pwm::ErrorType for LedcDriver<'d> { +impl embedded_hal::pwm::ErrorType for LedcDriver<'_> { type Error = PwmError; } @@ -341,7 +341,7 @@ fn to_pwm_err(err: EspError) -> PwmError { PwmError::other(err) } -impl<'d> embedded_hal::pwm::SetDutyCycle for LedcDriver<'d> { +impl embedded_hal::pwm::SetDutyCycle for LedcDriver<'_> { fn max_duty_cycle(&self) -> u16 { let duty = self.get_max_duty(); let duty_cap: u16 = if duty > u16::MAX as u32 { @@ -374,7 +374,7 @@ impl<'d> embedded_hal::pwm::SetDutyCycle for LedcDriver<'d> { } } -impl<'d> embedded_hal_0_2::PwmPin for LedcDriver<'d> { +impl embedded_hal_0_2::PwmPin for LedcDriver<'_> { type Duty = Duty; fn disable(&mut self) { diff --git a/src/peripheral.rs b/src/peripheral.rs index 5145bef4f..9eb1cb9cb 100644 --- a/src/peripheral.rs +++ b/src/peripheral.rs @@ -75,7 +75,7 @@ impl<'a, T> PeripheralRef<'a, T> { } } -impl<'a, T> Deref for PeripheralRef<'a, T> { +impl Deref for PeripheralRef<'_, T> { type Target = T; #[inline] @@ -84,7 +84,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/src/spi.rs b/src/spi.rs index d0c34344b..6239a9106 100644 --- a/src/spi.rs +++ b/src/spi.rs @@ -611,13 +611,13 @@ impl<'d> SpiDriver<'d> { } } -impl<'d> Drop for SpiDriver<'d> { +impl Drop for SpiDriver<'_> { fn drop(&mut self) { esp!(unsafe { spi_bus_free(self.host()) }).unwrap(); } } -unsafe impl<'d> Send for SpiDriver<'d> {} +unsafe impl Send for SpiDriver<'_> {} pub struct SpiBusDriver<'d, T> where @@ -1697,7 +1697,7 @@ where }, } -impl<'c, 'p, P, M> CsCtl<'c, 'p, P, M> +impl CsCtl<'_, '_, P, M> where P: OutputPin, M: OutputMode, diff --git a/src/task.rs b/src/task.rs index f2f196c0c..0966caf7e 100644 --- a/src/task.rs +++ b/src/task.rs @@ -559,7 +559,7 @@ unsafe impl Sync for CriticalSection {} pub struct CriticalSectionGuard<'a>(&'a CriticalSection); -impl<'a> Drop for CriticalSectionGuard<'a> { +impl Drop for CriticalSectionGuard<'_> { #[inline(always)] #[link_section = ".iram1.csg_drop"] fn drop(&mut self) { diff --git a/src/temp_sensor.rs b/src/temp_sensor.rs index 85a507adf..5afe84f8a 100644 --- a/src/temp_sensor.rs +++ b/src/temp_sensor.rs @@ -185,6 +185,6 @@ impl Drop for TempSensorDriver<'_> { } } -unsafe impl<'d> Send for TempSensorDriver<'d> {} +unsafe impl Send for TempSensorDriver<'_> {} crate::impl_peripheral!(TempSensor); diff --git a/src/timer.rs b/src/timer.rs index f272b7ae1..a10397faa 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -547,7 +547,7 @@ impl<'d> TimerDriver<'d> { } } -impl<'d> Drop for TimerDriver<'d> { +impl Drop for TimerDriver<'_> { fn drop(&mut self) { self.disable_interrupt().unwrap(); @@ -562,7 +562,7 @@ impl<'d> Drop for TimerDriver<'d> { } } -unsafe impl<'d> Send for TimerDriver<'d> {} +unsafe impl Send for TimerDriver<'_> {} impl<'d> embedded_hal_async::delay::DelayNs for TimerDriver<'d> { async fn delay_ns(&mut self, ns: u32) { diff --git a/src/uart.rs b/src/uart.rs index 5916ed322..f019ef487 100644 --- a/src/uart.rs +++ b/src/uart.rs @@ -716,8 +716,8 @@ pub struct UartDriver<'d> { _p: PhantomData<&'d mut ()>, } -unsafe impl<'d> Send for UartDriver<'d> {} -unsafe impl<'d> Sync for UartDriver<'d> {} +unsafe impl Send for UartDriver<'_> {} +unsafe impl Sync for UartDriver<'_> {} /// Serial receiver pub struct UartRxDriver<'d> { @@ -965,23 +965,23 @@ impl<'d> UartDriver<'d> { } } -impl<'d> Drop for UartDriver<'d> { +impl Drop for UartDriver<'_> { fn drop(&mut self) { delete_driver(self.port()).unwrap(); } } -impl<'d> embedded_io::ErrorType for UartDriver<'d> { +impl embedded_io::ErrorType for UartDriver<'_> { type Error = EspIOError; } -impl<'d> embedded_io::Read for UartDriver<'d> { +impl embedded_io::Read for UartDriver<'_> { fn read(&mut self, buf: &mut [u8]) -> Result { UartDriver::read(self, buf, delay::BLOCK).map_err(EspIOError) } } -impl<'d> embedded_io::Write for UartDriver<'d> { +impl embedded_io::Write for UartDriver<'_> { fn write(&mut self, buf: &[u8]) -> Result { UartDriver::write(self, buf).map_err(EspIOError) } @@ -991,7 +991,7 @@ impl<'d> embedded_io::Write for UartDriver<'d> { } } -impl<'d> embedded_hal_0_2::serial::Read for UartDriver<'d> { +impl embedded_hal_0_2::serial::Read for UartDriver<'_> { type Error = SerialError; fn read(&mut self) -> nb::Result { @@ -999,7 +999,7 @@ impl<'d> embedded_hal_0_2::serial::Read for UartDriver<'d> { } } -impl<'d> embedded_hal_0_2::serial::Write for UartDriver<'d> { +impl embedded_hal_0_2::serial::Write for UartDriver<'_> { type Error = SerialError; fn flush(&mut self) -> nb::Result<(), Self::Error> { @@ -1011,17 +1011,17 @@ impl<'d> embedded_hal_0_2::serial::Write for UartDriver<'d> { } } -impl<'d> embedded_hal_nb::serial::ErrorType for UartDriver<'d> { +impl embedded_hal_nb::serial::ErrorType for UartDriver<'_> { type Error = SerialError; } -impl<'d> embedded_hal_nb::serial::Read for UartDriver<'d> { +impl embedded_hal_nb::serial::Read for UartDriver<'_> { fn read(&mut self) -> nb::Result { embedded_hal_nb::serial::Read::read(&mut *self.rx()) } } -impl<'d> embedded_hal_nb::serial::Write for UartDriver<'d> { +impl embedded_hal_nb::serial::Write for UartDriver<'_> { fn write(&mut self, byte: u8) -> nb::Result<(), Self::Error> { embedded_hal_nb::serial::Write::write(&mut *self.tx(), byte) } @@ -1031,7 +1031,7 @@ impl<'d> embedded_hal_nb::serial::Write for UartDriver<'d> { } } -impl<'d> core::fmt::Write for UartDriver<'d> { +impl core::fmt::Write for UartDriver<'_> { fn write_str(&mut self, s: &str) -> core::fmt::Result { self.tx().write_str(s) } @@ -1220,23 +1220,23 @@ impl<'d> UartRxDriver<'d> { } } -impl<'d> Drop for UartRxDriver<'d> { +impl Drop for UartRxDriver<'_> { fn drop(&mut self) { self.owner.drop_impl(self.port()).unwrap() } } -impl<'d> embedded_io::ErrorType for UartRxDriver<'d> { +impl embedded_io::ErrorType for UartRxDriver<'_> { type Error = EspIOError; } -impl<'d> embedded_io::Read for UartRxDriver<'d> { +impl embedded_io::Read for UartRxDriver<'_> { fn read(&mut self, buf: &mut [u8]) -> Result { UartRxDriver::read(self, buf, delay::BLOCK).map_err(EspIOError) } } -impl<'d> embedded_hal_0_2::serial::Read for UartRxDriver<'d> { +impl embedded_hal_0_2::serial::Read for UartRxDriver<'_> { type Error = SerialError; fn read(&mut self) -> nb::Result { @@ -1248,11 +1248,11 @@ impl<'d> embedded_hal_0_2::serial::Read for UartRxDriver<'d> { } } -impl<'d> embedded_hal_nb::serial::ErrorType for UartRxDriver<'d> { +impl embedded_hal_nb::serial::ErrorType for UartRxDriver<'_> { type Error = SerialError; } -impl<'d> embedded_hal_nb::serial::Read for UartRxDriver<'d> { +impl embedded_hal_nb::serial::Read for UartRxDriver<'_> { fn read(&mut self) -> nb::Result { let mut buf = [0_u8]; @@ -1415,13 +1415,13 @@ impl<'d> UartTxDriver<'d> { } } -impl<'d> Drop for UartTxDriver<'d> { +impl Drop for UartTxDriver<'_> { fn drop(&mut self) { self.owner.drop_impl(self.port()).unwrap() } } -impl<'d> embedded_io::Write for UartTxDriver<'d> { +impl embedded_io::Write for UartTxDriver<'_> { fn write(&mut self, buf: &[u8]) -> Result { UartTxDriver::write(self, buf).map_err(EspIOError) } @@ -1431,11 +1431,11 @@ impl<'d> embedded_io::Write for UartTxDriver<'d> { } } -impl<'d> embedded_io::ErrorType for UartTxDriver<'d> { +impl embedded_io::ErrorType for UartTxDriver<'_> { type Error = EspIOError; } -impl<'d> embedded_hal_0_2::serial::Write for UartTxDriver<'d> { +impl embedded_hal_0_2::serial::Write for UartTxDriver<'_> { type Error = SerialError; fn flush(&mut self) -> nb::Result<(), Self::Error> { @@ -1447,11 +1447,11 @@ impl<'d> embedded_hal_0_2::serial::Write for UartTxDriver<'d> { } } -impl<'d> embedded_hal_nb::serial::ErrorType for UartTxDriver<'d> { +impl embedded_hal_nb::serial::ErrorType for UartTxDriver<'_> { type Error = SerialError; } -impl<'d> embedded_hal_nb::serial::Write for UartTxDriver<'d> { +impl embedded_hal_nb::serial::Write for UartTxDriver<'_> { fn flush(&mut self) -> nb::Result<(), Self::Error> { check_nb_timeout(UartTxDriver::wait_done(self, delay::NON_BLOCK)) } @@ -1461,7 +1461,7 @@ impl<'d> embedded_hal_nb::serial::Write for UartTxDriver<'d> { } } -impl<'d> core::fmt::Write for UartTxDriver<'d> { +impl core::fmt::Write for UartTxDriver<'_> { fn write_str(&mut self, s: &str) -> core::fmt::Result { let buf = s.as_bytes(); let mut offset = 0;