Fix clippy warnings
This commit is contained in:
parent
4aa5fe8df4
commit
b1f9829532
@ -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!\
|
||||
|
@ -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!\
|
||||
|
Loading…
x
Reference in New Issue
Block a user