Skip to content

Commit

Permalink
Address clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mciantyre committed Aug 5, 2024
1 parent 0d94d21 commit 715a643
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/common/lpspi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,7 @@ impl<P, const N: u8> Lpspi<P, N> {
self.spin_transmit(tx, word_count),
self.spin_receive(rx, word_count),
))
.map_err(|err| {
self.recover_from_error();
err
})?;
.inspect_err(|_| self.recover_from_error())?;

self.flush()?;

Expand All @@ -827,9 +824,8 @@ impl<P, const N: u8> Lpspi<P, N> {
let word_count = word_count(data);
let tx = TransmitBuffer::new(data);

crate::spin_on(self.spin_transmit(tx, word_count)).map_err(|err| {
crate::spin_on(self.spin_transmit(tx, word_count)).inspect_err(|_| {
self.recover_from_error();
err
})?;

self.flush()?;
Expand Down

0 comments on commit 715a643

Please sign in to comment.