@@ -587,8 +587,8 @@ impl FatVolume {
587
587
// Can quit early
588
588
return Ok ( ( ) ) ;
589
589
} else if dir_entry. is_valid ( ) && !dir_entry. is_lfn ( ) {
590
- // Safe, since Block::LEN always fits on a u32
591
- let start = u32 :: try_from ( start) . unwrap ( ) ;
590
+ // Block::LEN always fits on a u32
591
+ let start = start as u32 ;
592
592
let entry = dir_entry. get_entry ( FatType :: Fat16 , block_idx, start) ;
593
593
func ( & entry) ;
594
594
}
@@ -642,8 +642,8 @@ impl FatVolume {
642
642
// Can quit early
643
643
return Ok ( ( ) ) ;
644
644
} else if dir_entry. is_valid ( ) && !dir_entry. is_lfn ( ) {
645
- // Safe, since Block::LEN always fits on a u32
646
- let start = u32 :: try_from ( start) . unwrap ( ) ;
645
+ // Block::LEN always fits on a u32
646
+ let start = start as u32 ;
647
647
let entry = dir_entry. get_entry ( FatType :: Fat32 , block, start) ;
648
648
func ( & entry) ;
649
649
}
@@ -769,8 +769,8 @@ impl FatVolume {
769
769
break ;
770
770
} else if dir_entry. matches ( match_name) {
771
771
// Found it
772
- // Safe, since Block::LEN always fits on a u32
773
- let start = u32 :: try_from ( start) . unwrap ( ) ;
772
+ // Block::LEN always fits on a u32
773
+ let start = start as u32 ;
774
774
return Ok ( dir_entry. get_entry ( fat_type, block, start) ) ;
775
775
}
776
776
}
0 commit comments