We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bc610a commit a9798b9Copy full SHA for a9798b9
1 file changed
tbf-parser/src/parse.rs
@@ -203,9 +203,10 @@ pub fn parse_tbf_header(
203
}
204
types::TbfHeaderTypes::TbfHeaderWriteableFlashRegions => {
205
// Length must be a multiple of the size of a region definition.
206
- if tlv_header.length as usize
207
- % mem::size_of::<types::TbfHeaderV2WriteableFlashRegion>()
208
- == 0
+ if (tlv_header.length as usize)
+ .is_multiple_of(mem::size_of::<
+ types::TbfHeaderV2WriteableFlashRegion,
209
+ >())
210
{
211
// Calculate how many writeable flash regions
212
// there are specified in this header.
0 commit comments