Fix clippy warnings

This commit is contained in:
Austen Adler 2021-10-12 17:15:24 -04:00
parent 4aa5fe8df4
commit b1f9829532
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ pub trait Ws28xxAdapter {
/// must fulfill the restrictions given by [`crate::timings`] and [`crate::encoding`] if the hardware
/// device uses the specified frequency in [`crate::timings::PI_SPI_HZ`].
fn write_encoded_rgb(&mut self, encoded_data: &[u8]) -> Result<(), String> {
self.get_hw_dev().write_all(&encoded_data)
self.get_hw_dev().write_all(encoded_data)
.map_err(|_| {
format!(
"Failed to send {} bytes via the specified hardware device. If you use SPI on Linux Perhaps your SPI buffer is too small!\

View File

@ -17,7 +17,7 @@ struct SpiHwAdapterDev(Spidev);
// Implement Hardwareabstraction for device.
impl HardwareDev for SpiHwAdapterDev {
fn write_all(&mut self, encoded_data: &[u8]) -> Result<(), String> {
self.0.write_all(&encoded_data)
self.0.write_all(encoded_data)
.map_err(|_| {
format!(
"Failed to send {} bytes via SPI. Perhaps your SPI buffer is too small!\