From b09643c886f99c9e4e0c889e168996d9ec88c253 Mon Sep 17 00:00:00 2001 From: Michael Watzko Date: Wed, 10 Jun 2020 16:50:10 +0200 Subject: [PATCH] Fix rightful clippy complaints about map_err --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4f59ded..8a6d8b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -350,7 +350,7 @@ impl< .map_err(|error| -> TransferError { TransferError::ChipSelectError(error) })?; - result.map_err(|error| TransferError::SpiError(error)) + result.map_err(TransferError::SpiError) } /// Reads enough bytes over SPI to fill the `target` u8 slice @@ -410,7 +410,7 @@ impl< .map_err(|error| -> TransferError { TransferError::ChipSelectError(error) })?; - result.map_err(|error| TransferError::SpiError(error)) + result.map_err(TransferError::SpiError) } /// Write a slice of u8 bytes over SPI