diff --git a/bluepill-rs/src/dmx2.rs b/bluepill-rs/src/dmx2.rs index 2e1cbe2..4f1b59f 100644 --- a/bluepill-rs/src/dmx2.rs +++ b/bluepill-rs/src/dmx2.rs @@ -29,11 +29,11 @@ impl DMX { assert!(mem.len() >= DMX_LEN * 2); let (tx_universe, tx_buffer) = { - let (left1, rest) = mem.split_at_mut(DMX_LEN); - let (left2, _) = rest.split_at_mut(DMX_LEN); + let (tx_universe, rest) = mem.split_at_mut(DMX_LEN); + let (tx_buffer, _) = rest.split_at_mut(DMX_LEN); - let tx_universe: &mut [u8; DMX_LEN] = left1.try_into().unwrap(); - let tx_buffer: &mut [u8; DMX_LEN] = left2.try_into().unwrap(); + let tx_universe: DMXUniverse = tx_universe.try_into().unwrap(); + let tx_buffer: DMXUniverse = tx_buffer.try_into().unwrap(); (tx_universe, tx_buffer) };