Skip to content

Commit

Permalink
feat: change expression to comply with clippy's manual_div_ceil
Browse files Browse the repository at this point in the history
  • Loading branch information
Oakchris1955 committed Dec 23, 2024
1 parent 38c46c5 commit 4552d6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/fat/bpb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ impl BootRecordFAT {
/// The size of the root directory (unless we have FAT32, in which case the size will be 0)
/// This calculation will round up
pub(crate) fn root_dir_sectors(&self) -> u16 {
((self.bpb.root_entry_count * DIRENTRY_SIZE as u16) + (self.bpb.bytes_per_sector - 1))
/ self.bpb.bytes_per_sector
(self.bpb.root_entry_count * DIRENTRY_SIZE as u16).div_ceil(self.bpb.bytes_per_sector)
}

#[inline]
Expand Down

0 comments on commit 4552d6f

Please sign in to comment.