From 44cb4159a67bcb0eeb9b0fa1e2e5fac2c2c2c2e3 Mon Sep 17 00:00:00 2001 From: Ragarnoy Date: Wed, 1 May 2024 00:05:22 +0200 Subject: [PATCH] rustmft --- embassy-embedded-hal/src/shared_bus/blocking/spi.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs index 8f1cce4ad..2979d4ace 100644 --- a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs @@ -33,17 +33,14 @@ pub struct SpiDevice<'a, M: RawMutex, BUS, CS> { cs: CS, } -impl<'a, M: RawMutex, BUS, CS> SpiDevice<'a, M, BUS, CS, > { +impl<'a, M: RawMutex, BUS, CS> SpiDevice<'a, M, BUS, CS> { /// Create a new `SpiDevice`. pub fn new(bus: &'a Mutex>, cs: CS) -> Self { - Self { - bus, - cs, - } + Self { bus, cs } } } -impl<'a, M: RawMutex, BUS, CS> spi::ErrorType for SpiDevice<'a, M, BUS, CS, > +impl<'a, M: RawMutex, BUS, CS> spi::ErrorType for SpiDevice<'a, M, BUS, CS> where BUS: spi::ErrorType, CS: OutputPin, @@ -51,7 +48,7 @@ where type Error = SpiDeviceError; } -impl embedded_hal_1::spi::SpiDevice for SpiDevice<'_, M, BUS, CS, > +impl embedded_hal_1::spi::SpiDevice for SpiDevice<'_, M, BUS, CS> where M: RawMutex, BUS: SpiBus, @@ -94,7 +91,6 @@ where } } - /// SPI device on a shared bus, with its own configuration. /// /// This is like [`SpiDevice`], with an additional bus configuration that's applied