Skip to content
Snippets Groups Projects
Verified Commit c2085cdf authored by Jonathan Brouwer's avatar Jonathan Brouwer
Browse files

Fix clippy

parent 576a4592
No related branches found
No related tags found
4 merge requests!11Resolve "Reading MPU over I2C hangs",!10Resolve "Reading MPU over I2C hangs": Attempt 4,!9Resolve "Reading MPU over I2C hangs",!8Resolve "Template code hangs on reading yaw, pitch, and roll."
Pipeline #818215 passed
......@@ -16,7 +16,7 @@ pub struct TwiWrapper {
impl embedded_hal::blocking::i2c::Write for TwiWrapper {
type Error = Error;
fn write<'w>(&mut self, addr: u8, bytes: &'w [u8]) -> Result<(), Error> {
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Error> {
cortex_m::interrupt::free(|_| self.twi.write(addr, bytes))
}
}
......@@ -24,7 +24,7 @@ impl embedded_hal::blocking::i2c::Write for TwiWrapper {
impl embedded_hal::blocking::i2c::Read for TwiWrapper {
type Error = Error;
fn read<'w>(&mut self, addr: u8, bytes: &'w mut [u8]) -> Result<(), Error> {
fn read(&mut self, addr: u8, bytes: &mut [u8]) -> Result<(), Error> {
cortex_m::interrupt::free(|_| self.twi.read(addr, bytes))
}
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment