Skip to content

Commit

Permalink
fix: clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
haata committed Feb 9, 2024
1 parent f910cab commit ccab739
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/efc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ impl Efc {
/// Returns: (page, offset, bank)
#[cfg(feature = "atsam4sd")]
fn translate_address(&self, address: u32) -> Result<(u16, u16, u8), EfcError> {
if address < FLASH_PARAMS.flash0_addr
|| address > FLASH_PARAMS.flash1_addr + FLASH_PARAMS.flash1_size
if !(FLASH_PARAMS.flash0_addr..=FLASH_PARAMS.flash1_addr + FLASH_PARAMS.flash1_size)
.contains(&address)
{
return Err(EfcError::AddressBoundsError);
}
Expand Down

0 comments on commit ccab739

Please sign in to comment.