diff options
| author | Sebastian Goll <[email protected]> | 2024-03-20 13:08:42 +0100 |
|---|---|---|
| committer | Sebastian Goll <[email protected]> | 2024-03-20 13:08:42 +0100 |
| commit | cff665f2ecf2c60358534cd4dfe06b1a469d45fa (patch) | |
| tree | 4cc2604beed74720e8599de4d19374fb86b55e08 | |
| parent | 4eb4108952ee75d75b2b575144a0db3a6380dd61 (diff) | |
Avoid unnecessary double-reference
| -rw-r--r-- | embassy-stm32/src/i2c/v1.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs index c96935d8f..f1ed7ca40 100644 --- a/embassy-stm32/src/i2c/v1.rs +++ b/embassy-stm32/src/i2c/v1.rs | |||
| @@ -403,7 +403,7 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 403 | let mut prev_op: Option<&mut Operation<'_>> = None; | 403 | let mut prev_op: Option<&mut Operation<'_>> = None; |
| 404 | let mut next_op = operations.next(); | 404 | let mut next_op = operations.next(); |
| 405 | 405 | ||
| 406 | while let Some(mut op) = next_op { | 406 | while let Some(op) = next_op { |
| 407 | next_op = operations.next(); | 407 | next_op = operations.next(); |
| 408 | 408 | ||
| 409 | // Check if this is the first frame of this type. This is the case for the first overall | 409 | // Check if this is the first frame of this type. This is the case for the first overall |
| @@ -439,7 +439,7 @@ impl<'d, T: Instance, TXDMA, RXDMA> I2c<'d, T, TXDMA, RXDMA> { | |||
| 439 | (false, Some(Operation::Write(_))) => FrameOptions::LastFrameNoStop, | 439 | (false, Some(Operation::Write(_))) => FrameOptions::LastFrameNoStop, |
| 440 | }; | 440 | }; |
| 441 | 441 | ||
| 442 | match &mut op { | 442 | match op { |
| 443 | Operation::Read(read) => self.blocking_read_timeout(addr, read, timeout, frame)?, | 443 | Operation::Read(read) => self.blocking_read_timeout(addr, read, timeout, frame)?, |
| 444 | Operation::Write(write) => self.write_bytes(addr, write, timeout, frame)?, | 444 | Operation::Write(write) => self.write_bytes(addr, write, timeout, frame)?, |
| 445 | } | 445 | } |
