Skip to content

Commit

Permalink
clippy: deny only_used_in_recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjc committed Jan 16, 2025
1 parent 6836d23 commit d2a3f4f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ option_map_unit_fn = "allow"
nonminimal_bool = "allow"
identity-op = "allow"
while-let-loop = "allow"
only_used_in_recursion = "allow"
manual-range-patterns = "allow"
manual-flatten = "allow"

Expand Down
20 changes: 17 additions & 3 deletions capsules/extra/src/mx25r6435f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,12 @@ impl<
self.rxbuffer.replace(read_buffer);

self.client.map(move |client| {
client.read_complete(sector, Ok(()));
client.read_complete(
sector,
read_write_status
.and(Ok(()))
.or(Err(hil::flash::Error::FlashError)),
);
});
} else {
let address =
Expand Down Expand Up @@ -488,7 +493,11 @@ impl<
self.state.set(State::Idle);
self.txbuffer.replace(write_buffer);
self.client.map(|client| {
client.erase_complete(Ok(()));
client.erase_complete(
read_write_status
.and(Ok(()))
.or(Err(hil::flash::Error::FlashError)),
);
});
}
State::WriteSectorWriteEnable {
Expand All @@ -503,7 +512,12 @@ impl<
self.txbuffer.replace(write_buffer);
self.client.map(|client| {
self.client_sector.take().map(|sector| {
client.write_complete(sector, Ok(()));
client.write_complete(
sector,
read_write_status
.and(Ok(()))
.or(Err(hil::flash::Error::FlashError)),
);
});
});
} else {
Expand Down

0 comments on commit d2a3f4f

Please sign in to comment.