We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf41147 commit 787104bCopy full SHA for 787104b
src/lib.rs
@@ -180,8 +180,14 @@ impl<I2C: embedded_hal_async::i2c::I2c, DELAY: embedded_hal_async::delay::DelayN
180
let mut acc_bytes: [u8; 6] = [0; 6];
181
self.read_regs(Register::XOutLow, &mut acc_bytes).await?;
182
Ok((
183
+ #[allow(clippy::unwrap_used)]
184
+ // panic safety: slice is always of length 2
185
i16::from_le_bytes(acc_bytes[0..2].try_into().unwrap()),
186
187
188
i16::from_le_bytes(acc_bytes[2..4].try_into().unwrap()),
189
190
191
i16::from_le_bytes(acc_bytes[4..6].try_into().unwrap()),
192
))
193
}
0 commit comments