diff --git a/embedded-hal-bus/src/i2c/atomic.rs b/embedded-hal-bus/src/i2c/atomic.rs index 793e827b..8443e461 100644 --- a/embedded-hal-bus/src/i2c/atomic.rs +++ b/embedded-hal-bus/src/i2c/atomic.rs @@ -101,7 +101,7 @@ impl Error for AtomicError { } } -unsafe impl<'a, T> Send for AtomicDevice<'a, T> {} +unsafe impl Send for AtomicDevice<'_, T> {} impl<'a, T> AtomicDevice<'a, T> where @@ -137,14 +137,14 @@ where } } -impl<'a, T> ErrorType for AtomicDevice<'a, T> +impl ErrorType for AtomicDevice<'_, T> where T: I2c, { type Error = AtomicError; } -impl<'a, T> I2c for AtomicDevice<'a, T> +impl I2c for AtomicDevice<'_, T> where T: I2c, { diff --git a/embedded-hal-bus/src/i2c/critical_section.rs b/embedded-hal-bus/src/i2c/critical_section.rs index 6830f284..be0bfb8c 100644 --- a/embedded-hal-bus/src/i2c/critical_section.rs +++ b/embedded-hal-bus/src/i2c/critical_section.rs @@ -21,14 +21,14 @@ impl<'a, T> CriticalSectionDevice<'a, T> { } } -impl<'a, T> ErrorType for CriticalSectionDevice<'a, T> +impl ErrorType for CriticalSectionDevice<'_, T> where T: I2c, { type Error = T::Error; } -impl<'a, T> I2c for CriticalSectionDevice<'a, T> +impl I2c for CriticalSectionDevice<'_, T> where T: I2c, { diff --git a/embedded-hal-bus/src/i2c/refcell.rs b/embedded-hal-bus/src/i2c/refcell.rs index 1519a751..445b6b02 100644 --- a/embedded-hal-bus/src/i2c/refcell.rs +++ b/embedded-hal-bus/src/i2c/refcell.rs @@ -75,14 +75,14 @@ impl<'a, T> RefCellDevice<'a, T> { } } -impl<'a, T> ErrorType for RefCellDevice<'a, T> +impl ErrorType for RefCellDevice<'_, T> where T: I2c, { type Error = T::Error; } -impl<'a, T> I2c for RefCellDevice<'a, T> +impl I2c for RefCellDevice<'_, T> where T: I2c, { diff --git a/embedded-hal-bus/src/spi/atomic.rs b/embedded-hal-bus/src/spi/atomic.rs index 7d18e28c..10dc043b 100644 --- a/embedded-hal-bus/src/spi/atomic.rs +++ b/embedded-hal-bus/src/spi/atomic.rs @@ -106,7 +106,7 @@ impl Error for AtomicError { } } -impl<'a, BUS, CS, D> ErrorType for AtomicDevice<'a, BUS, CS, D> +impl ErrorType for AtomicDevice<'_, BUS, CS, D> where BUS: ErrorType, CS: OutputPin, @@ -114,7 +114,7 @@ where type Error = AtomicError>; } -impl<'a, Word: Copy + 'static, BUS, CS, D> SpiDevice for AtomicDevice<'a, BUS, CS, D> +impl SpiDevice for AtomicDevice<'_, BUS, CS, D> where BUS: SpiBus, CS: OutputPin, diff --git a/embedded-hal-bus/src/spi/critical_section.rs b/embedded-hal-bus/src/spi/critical_section.rs index 4c3a46eb..3ab2d29c 100644 --- a/embedded-hal-bus/src/spi/critical_section.rs +++ b/embedded-hal-bus/src/spi/critical_section.rs @@ -72,7 +72,7 @@ impl<'a, BUS, CS> CriticalSectionDevice<'a, BUS, CS, super::NoDelay> { } } -impl<'a, BUS, CS, D> ErrorType for CriticalSectionDevice<'a, BUS, CS, D> +impl ErrorType for CriticalSectionDevice<'_, BUS, CS, D> where BUS: ErrorType, CS: OutputPin, @@ -80,7 +80,7 @@ where type Error = DeviceError; } -impl<'a, Word: Copy + 'static, BUS, CS, D> SpiDevice for CriticalSectionDevice<'a, BUS, CS, D> +impl SpiDevice for CriticalSectionDevice<'_, BUS, CS, D> where BUS: SpiBus, CS: OutputPin, diff --git a/embedded-hal-bus/src/spi/refcell.rs b/embedded-hal-bus/src/spi/refcell.rs index 35bea03a..9f0374e3 100644 --- a/embedded-hal-bus/src/spi/refcell.rs +++ b/embedded-hal-bus/src/spi/refcell.rs @@ -69,7 +69,7 @@ impl<'a, BUS, CS> RefCellDevice<'a, BUS, CS, super::NoDelay> { } } -impl<'a, BUS, CS, D> ErrorType for RefCellDevice<'a, BUS, CS, D> +impl ErrorType for RefCellDevice<'_, BUS, CS, D> where BUS: ErrorType, CS: OutputPin, @@ -77,7 +77,7 @@ where type Error = DeviceError; } -impl<'a, Word: Copy + 'static, BUS, CS, D> SpiDevice for RefCellDevice<'a, BUS, CS, D> +impl SpiDevice for RefCellDevice<'_, BUS, CS, D> where BUS: SpiBus, CS: OutputPin, diff --git a/embedded-hal-nb/src/serial.rs b/embedded-hal-nb/src/serial.rs index 2b0d504e..98142270 100644 --- a/embedded-hal-nb/src/serial.rs +++ b/embedded-hal-nb/src/serial.rs @@ -118,7 +118,6 @@ impl + ?Sized, Word: Copy> Write for &mut T { /// Implementation of `core::fmt::Write` for the HAL's `serial::Write`. /// /// TODO write example of usage - impl core::fmt::Write for dyn Write + '_ where Word: Copy + From,