Fix rightful clippy complaints about map_err

This commit is contained in:
Michael Watzko 2020-06-10 16:50:10 +02:00
commit b09643c886

View file

@ -350,7 +350,7 @@ impl<
.map_err(|error| -> TransferError<SpiError, ChipSelectError> { .map_err(|error| -> TransferError<SpiError, ChipSelectError> {
TransferError::ChipSelectError(error) 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 /// Reads enough bytes over SPI to fill the `target` u8 slice
@ -410,7 +410,7 @@ impl<
.map_err(|error| -> TransferError<SpiError, ChipSelectError> { .map_err(|error| -> TransferError<SpiError, ChipSelectError> {
TransferError::ChipSelectError(error) TransferError::ChipSelectError(error)
})?; })?;
result.map_err(|error| TransferError::SpiError(error)) result.map_err(TransferError::SpiError)
} }
/// Write a slice of u8 bytes over SPI /// Write a slice of u8 bytes over SPI