Skip to content

Commit 3afbb41

Browse files
Fix non-slow write_byte
1 parent 85769ca commit 3afbb41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ where
2626
}
2727
/// Write a single color for ws2812 devices
2828
#[cfg(feature = "slow")]
29-
fn write_byte(&mut self, data: u8) {
29+
fn write_byte(&mut self, mut data: u8) {
3030
for _ in 0..8 {
3131
if (data & 0x80) != 0 {
3232
block!(self.timer.wait()).ok();
@@ -46,7 +46,7 @@ where
4646
}
4747

4848
#[cfg(not(feature = "slow"))]
49-
fn write_byte(&mut self, data: u8) {
49+
fn write_byte(&mut self, mut data: u8) {
5050
for _ in 0..8 {
5151
if (data & 0x80) != 0 {
5252
block!(self.timer.wait()).ok();

0 commit comments

Comments
 (0)