From df0880458fb942856d6fde14a80530f8db3eff4c Mon Sep 17 00:00:00 2001 From: James Munns Date: Tue, 21 Jan 2025 20:23:08 +0100 Subject: [PATCH] Fix clippy errors --- embedded-hal-bus/src/i2c/mutex.rs | 4 ++-- embedded-hal-bus/src/spi/mutex.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/embedded-hal-bus/src/i2c/mutex.rs b/embedded-hal-bus/src/i2c/mutex.rs index ef4a9f510..1fc1b4383 100644 --- a/embedded-hal-bus/src/i2c/mutex.rs +++ b/embedded-hal-bus/src/i2c/mutex.rs @@ -19,14 +19,14 @@ impl<'a, T> MutexDevice<'a, T> { } } -impl<'a, T> ErrorType for MutexDevice<'a, T> +impl ErrorType for MutexDevice<'_, T> where T: I2c, { type Error = T::Error; } -impl<'a, T> I2c for MutexDevice<'a, T> +impl I2c for MutexDevice<'_, T> where T: I2c, { diff --git a/embedded-hal-bus/src/spi/mutex.rs b/embedded-hal-bus/src/spi/mutex.rs index 83fe85d88..e3afc71e5 100644 --- a/embedded-hal-bus/src/spi/mutex.rs +++ b/embedded-hal-bus/src/spi/mutex.rs @@ -70,7 +70,7 @@ impl<'a, BUS, CS> MutexDevice<'a, BUS, CS, super::NoDelay> { } } -impl<'a, BUS, CS, D> ErrorType for MutexDevice<'a, BUS, CS, D> +impl ErrorType for MutexDevice<'_, BUS, CS, D> where BUS: ErrorType, CS: OutputPin, @@ -78,7 +78,7 @@ where type Error = DeviceError; } -impl<'a, Word: Copy + 'static, BUS, CS, D> SpiDevice for MutexDevice<'a, BUS, CS, D> +impl SpiDevice for MutexDevice<'_, BUS, CS, D> where BUS: SpiBus, CS: OutputPin,