@@ -587,8 +587,8 @@ impl FatVolume {
587587 // Can quit early
588588 return Ok ( ( ) ) ;
589589 } 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 ;
592592 let entry = dir_entry. get_entry ( FatType :: Fat16 , block_idx, start) ;
593593 func ( & entry) ;
594594 }
@@ -642,8 +642,8 @@ impl FatVolume {
642642 // Can quit early
643643 return Ok ( ( ) ) ;
644644 } 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 ;
647647 let entry = dir_entry. get_entry ( FatType :: Fat32 , block, start) ;
648648 func ( & entry) ;
649649 }
@@ -769,8 +769,8 @@ impl FatVolume {
769769 break ;
770770 } else if dir_entry. matches ( match_name) {
771771 // 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 ;
774774 return Ok ( dir_entry. get_entry ( fat_type, block, start) ) ;
775775 }
776776 }
0 commit comments